/* ================================
   GLOBAL RESET & BASE
================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    font-family: "Poppins", sans-serif;
    background: #f7f9fc;
    color: #222;
    overflow-x: hidden;
}

/* ================================
   GRADIENT TEXT
================================ */
.gradient-text {
    background: linear-gradient(90deg, #5fa8d3, #b39ddb, #80cbc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 4px rgba(95, 168, 211, 0.4)) drop-shadow(0 0 8px rgba(179, 157, 219, 0.3));
}

/* ================================
   HERO SECTION
================================ */
.hero {
    position: relative;
    height: 100vh;
    width: 100%;
    background: radial-gradient(circle at 50% 0%, #eef4ff 0%, #f7f9fc 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

#networkCanvasLight,
#brainCanvasLight {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* HERO CONTENT */
.hero-content {
    position: relative;
    z-index: 10;
    animation: fadeIn 1.4s ease;
    max-width: 700px;
}

.hero-content h1 {
    font-size: 2.7rem;
    font-weight: 700;
}

.hero-content p {
    margin-top: 1rem;
    font-size: 1.2rem;
    color: #555;
}

/* HERO BUTTONS */
.buttons {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.primary-btn,
.secondary-btn {
    padding: 0.7rem 1.4rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: 0.3s ease;
}

/* PRIMARY BUTTON */
.primary-btn {
    background: linear-gradient(90deg, #5fa8d3, #80cbc4);
    color: white;
    box-shadow: 0 0 10px rgba(95, 168, 211, 0.4);
}

.primary-btn:hover {
    box-shadow: 0 0 18px rgba(95, 168, 211, 0.6);
}

/* SECONDARY BUTTON */
.secondary-btn {
    border: 2px solid #5fa8d3;
    color: #5fa8d3;
}

.secondary-btn:hover {
    background: rgba(95, 168, 211, 0.12);
}

/* ================================
   SECTION — NEURAL BENEFITS
================================ */
.neuro-section {
    width: 100%;
    background: #ffffff;
    padding: 3rem 1.5rem 3.5rem;
    position: relative;
    z-index: 10;
}

.neuro-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(95, 168, 211, 0.16) 0, transparent 55%),
        radial-gradient(circle at 80% 10%, rgba(179, 157, 219, 0.19) 0, transparent 55%),
        radial-gradient(circle at 50% 90%, rgba(128, 203, 196, 0.15) 0, transparent 55%);
    opacity: 0.7;
    pointer-events: none;
}

.neuro-title {
    position: relative;
    text-align: center;
    font-size: 1.9rem;
    font-weight: 700;
    margin-bottom: 2.3rem;
}

/* GRID */
.neuro-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.8rem;
    max-width: 1100px;
    margin: 0 auto;
}

/* Line behind cards */
.neuro-grid::before {
    content: "";
    position: absolute;
    left: 5%;
    right: 5%;
    top: 50%;
    height: 1.5px;
    background: linear-gradient(90deg, rgba(95, 168, 211, 0.4), rgba(179, 157, 219, 0.4));
    opacity: 0.4;
}

/* ================================
   CARD — FULL 3D STRUCTURE
================================ */
.neuro-card {
    perspective: 1000px;
    cursor: pointer;
}

.card-inner {
    width: 100%;
    height: 190px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.7s cubic-bezier(.22, 1, .36, 1);
}

.neuro-card.clicked .card-inner {
    transform: rotateY(180deg);
}

/* FRONT + BACK */
.card-front,
.card-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    border-radius: 18px;
    transition: opacity 0.4s ease;
}

/* FRONT SIDE */
.card-front {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(95, 168, 211, 0.25);
    padding: 1.6rem 1.4rem 1.7rem;
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    z-index: 2;
    opacity: 1;
    pointer-events: auto;
}

/* Hover only when not flipped */
.neuro-card:not(.clicked):hover .card-front {
    transform: translateY(-6px) rotateX(3deg) rotateY(-3deg);
    border-color: rgba(95, 168, 211, 0.6);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}

/* When flipped: front hidden */
.neuro-card.clicked .card-front {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* BACK SIDE */
.card-back {
    background: white;
    transform: rotateY(180deg);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
}

.card-back img {
    width: 70%;
    height: auto;
    filter: drop-shadow(0 0 12px rgba(95, 168, 211, 0.5));
}

/* Show back when flipped */
.neuro-card.clicked .card-back {
    opacity: 1;
    pointer-events: auto;
}

/* ================================
   NODE PULSE
================================ */
.neuro-node {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #5fa8d3, #b39ddb);
    margin-bottom: 0.9rem;
    animation: nodePulse 3s ease-in-out infinite;
    box-shadow:
        0 0 0 4px rgba(95, 168, 211, 0.3),
        0 0 12px rgba(95, 168, 211, 0.7);
}

@keyframes nodePulse {
    0% {
        transform: scale(1);
        opacity: 0.85;
    }

    50% {
        transform: scale(1.18);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0.85;
    }
}

/* ================================
   PROCESS — NEURONAL ANIMATION
================================ */
.process-neuro {
    width: 100%;
    padding: 3rem 1.5rem 4rem;
    background: #f7f9fc;
    position: relative;
    z-index: 10;
}

.process-grid {
    max-width: 1100px;
    margin: 2rem auto 0;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
}

.proc-col {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
}

.proc-step {
    background: #ffffff;
    border-radius: 14px;
    padding: 1rem 1.2rem;
    border: 1px solid rgba(95, 168, 211, 0.25);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    animation: floatStep 5s ease-in-out infinite;
}

.proc-step:nth-child(2) {
    animation-delay: 1.3s;
}

@keyframes floatStep {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-6px);
    }

    100% {
        transform: translateY(0px);
    }
}

.dot {
    width: 13px;
    height: 13px;
    border-radius: 999px;
    background: linear-gradient(135deg, #5fa8d3, #80cbc4);
    box-shadow:
        0 0 0 4px rgba(95, 168, 211, 0.3),
        0 0 10px rgba(95, 168, 211, 0.55);
}

/* Center Animated Line */
.proc-connector {
    display: flex;
    justify-content: center;
    align-items: center;
}

.connector-line {
    width: 4px;
    height: 80%;
    border-radius: 4px;
    background: linear-gradient(180deg, #5fa8d3, #b39ddb);
    box-shadow: 0 0 12px rgba(95, 168, 211, 0.4);
    animation: pulseLine 3s ease-in-out infinite;
}

@keyframes pulseLine {
    0% {
        opacity: 0.7;
        transform: scaleY(1);
    }

    50% {
        opacity: 1;
        transform: scaleY(1.06);
    }

    100% {
        opacity: 0.7;
        transform: scaleY(1);
    }
}

/* ================================
   RESPONSIVE
================================ */
@media (max-width: 900px) {
    .neuro-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .process-grid {
        grid-template-columns: 1fr;
    }

    .proc-connector {
        display: none;
    }
}

@media (max-width: 640px) {
    .hero-content h1 {
        font-size: 2.2rem;
    }
}

/* ================================
   FADE IN
================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-front h3 {
            color: #5fa8d3;
        }