/* ECOSYSTEM/ CONSTELLATION (03b) */

.hub-section {
    position: relative;
    background: linear-gradient(180deg, #f6f7fb 0%, #eef1f8 100%);
    overflow: hidden;
    padding: 56px 0 64px;
}

/* vertical line grid — matches hero pattern for visual continuity */
.hub-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 84px 100%;
    background-position: center top;
    mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        #000 12%,
        #000 88%,
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        #000 12%,
        #000 88%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 0;
}

/* purple radial wash — matches hero */
.hub-section::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(
            55% 60% at 100% 30%,
            rgba(93, 46, 222, 0.18) 0%,
            rgba(93, 46, 222, 0.06) 40%,
            transparent 72%
        ),
        radial-gradient(
            45% 55% at 0% 80%,
            rgba(138, 91, 250, 0.14) 0%,
            transparent 65%
        );
    pointer-events: none;
    z-index: 0;
}

.hub-section .container {
    position: relative;
    z-index: 1;
}

.hub-stage {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    aspect-ratio: 1200 / 600;
}

.hub-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.hub-core {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 29%;
    aspect-ratio: 1 / 1;
    max-width: 290px;
    border-radius: 50%;
    background: radial-gradient(
        circle at 50% 38%,

        #ffffff 0%,

        #f4f1ff 65%,

        #e6dffb 100%
    );
    box-shadow:
        0 0 0 1px rgba(139, 92, 246, 0.18),
        0 30px 80px -20px rgba(99, 91, 255, 0.35),
        inset 0 0 60px rgba(139, 92, 246, 0.08);
    z-index: 2;
}

/* Rotate SVG ring groups (slow, opposite directions) */

.hub-ring-spin-a {
    animation: hubRingSpin 60s linear infinite;
}

.hub-ring-spin-b {
    animation: hubRingSpin 90s linear infinite reverse;
}

@keyframes hubRingSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Smooth connector "draw in" + flowing dash + dot pulse-in */

.hub-connector {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation:
        hubDraw 1.4s cubic-bezier(0.65, 0.05, 0.36, 1) forwards,
        hubFlow 3.5s linear 1.6s infinite;
}

@keyframes hubDraw {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes hubFlow {
    from {
        stroke-dasharray: 6 8;
        stroke-dashoffset: 0;
    }

    to {
        stroke-dasharray: 6 8;
        stroke-dashoffset: -28;
    }
}

.hub-dot {
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    animation:
        hubDotIn 0.5s ease-out forwards,
        hubDotPulse 2.4s ease-in-out 1.6s infinite;
}

.hub-dot-static {
    opacity: 0;
    animation: hubDotIn 0.5s ease-out 0.7s forwards;
}

@keyframes hubDotIn {
    from {
        opacity: 0;
        transform: scale(0.2);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes hubDotPulse {
    0%,
    100% {
        transform: scale(1);
        filter: none;
    }

    50% {
        transform: scale(1.3);
        filter: drop-shadow(0 0 6px currentColor);
    }
}

.hub-core-inner {
    text-align: center;
    padding: 24px;
}

.hub-core-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    margin-bottom: 8px;
}

.hub-core-title {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0b0d1a;
    line-height: 1;
}

.hub-core-title span {
    background: linear-gradient(105deg, #8b5cf6, #6d28d9);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hub-core-bar {
    display: block;
    width: 48px;
    height: 3px;
    background: #8b5cf6;
    border-radius: 3px;
    margin: 12px auto 14px;
}

.hub-core-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 13.5px;
    color: #2e3346;
    line-height: 1.9;
    font-weight: 500;
}

/* Cards */

.hub-card {
    position: absolute;
    width: 300px;
    min-height: 128px;
    padding: 14px 18px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow:
        0 1px 0 rgba(15, 23, 42, 0.04),
        0 18px 40px -18px rgba(15, 23, 42, 0.25),
        0 0 0 1.5px rgba(15, 23, 42, 0.07);
    text-decoration: none;
    color: inherit;
    border: none;
    animation: hubCardBorderPulse 3.6s ease-in-out infinite;
    transition:
        box-shadow 0.25s ease,
        transform 0.25s ease;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
}

.hub-card:hover {
    box-shadow:
        0 1px 0 rgba(15, 23, 42, 0.04),
        0 28px 50px -18px rgba(15, 23, 42, 0.3),
        0 0 0 2px var(--accent),
        0 0 18px 2px color-mix(in srgb, var(--accent) 40%, transparent);
    animation-play-state: paused;
}

@keyframes hubCardBorderPulse {
    0%,
    100% {
        box-shadow:
            0 1px 0 rgba(15, 23, 42, 0.04),
            0 18px 40px -18px rgba(15, 23, 42, 0.25),
            0 0 0 1.5px rgba(15, 23, 42, 0.07);
    }

    50% {
        box-shadow:
            0 1px 0 rgba(15, 23, 42, 0.04),
            0 18px 40px -18px rgba(15, 23, 42, 0.22),
            0 0 0 1.5px var(--accent),
            0 0 14px 1px color-mix(in srgb, var(--accent) 35%, transparent);
    }
}

/* Left: logo + accent divider */

.hub-card-head {
    flex-shrink: 0;
    width: 92px;
    padding-right: 10px;
    margin-right: 12px;
}

.hub-card-visit-link {
    margin-top: 12px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--accent, #8b5cf6);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition:
        transform 0.2s ease,
        filter 0.2s ease;
}

.hub-card-visit-link:hover {
    transform: translateY(-1px) scale(1.04);
    filter: brightness(1.08);
}

.hub-card-visit-link svg {
    display: block;
}

.hub-card {
    z-index: 3;
}

/* Logo: left column, full height, accent divider on right */

.hub-card-logo {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: center;
    width: 82px;
    height: 82px;
    object-fit: contain;
    display: block;
    position: relative;
}

/* Right: title + list stacked vertically */

.hub-card-body {
    flex: 1;
    min-width: 0;
}

.hub-card h4 {
    margin: 0 0 6px;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #0b0d1a;
    line-height: 1.15;
}

.hub-card h4 .accent {
    color: var(--accent, #8b5cf6);
}

.hub-card ul {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 12.5px;
    color: #4b5263;
    line-height: 1.55;
}

/* Bullet points colored with accent */

.hub-card ul li {
    padding: 2px 0;
    color: #3a4053;
    font-weight: 500;
}

.hub-card ul li::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent, #8b5cf6);
    flex-shrink: 0;
}

/* Card positions — perfectly symmetric across both axes (stage 1200x600) */

.hub-card--tl {
    left: 2%;
    top: 5%;
    animation-delay: 0s;
}

.hub-card--tr {
    right: 2%;
    top: 5%;
    animation-delay: 0.6s;
}

.hub-card--ml {
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    animation-delay: 1.2s;
}

.hub-card--mr {
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    animation-delay: 1.8s;
}

.hub-card--bl {
    left: 2%;
    bottom: 5%;
    animation-delay: 2.4s;
}

.hub-card--br {
    right: 2%;
    bottom: 5%;
    animation-delay: 3s;
}

.hub-card--ml:hover,
.hub-card--mr:hover {
    transform: translateY(-50%) translateY(-2px);
}

.hub-card--tl:hover,
.hub-card--tr:hover,
.hub-card--bl:hover,
.hub-card--br:hover {
    transform: translateY(-2px);
}

/* Tablet — 2-column grid, hide constellation lines & core to keep layout clean */

@media (max-width: 1024px) {
    .hub-stage {
        aspect-ratio: auto;
        min-height: auto;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        padding: 16px 0;
    }

    .hub-lines,
    .hub-core {
        display: none;
    }

    .hub-card {
        position: static;
        width: auto;
        transform: none !important;
    }

    .hub-card--tl,
    .hub-card--tr,
    .hub-card--ml,
    .hub-card--mr,
    .hub-card--bl,
    .hub-card--br {
        left: auto;
        right: auto;
        top: auto;
        bottom: auto;
    }
}

/* Mobile */

@media (max-width: 640px) {
    .hub-stage {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .hub-card {
        padding: 14px 16px;
    }

    .hub-card-head {
        width: 84px;
        padding-right: 10px;
        margin-right: 12px;
    }

    .hub-card-logo {
        width: 72px;
        height: 72px;
    }
}

/* iALab Services Orbit (03c) */

.ialab-section {
    background: radial-gradient(
        circle at 50% 50%,

        #ffffff 0%,

        #f4f7fd 60%,

        #e9eff9 100%
    );
    overflow: hidden;
    position: relative;
}

.ialab-section .container {
    position: relative;
    z-index: 1;
}

.ialab-stage {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 24px auto 0;
    aspect-ratio: 1 / 1;
}

.ialab-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.ialab-ring-spin {
    transform-origin: 450px 450px;
    animation: ialabRingSpin 80s linear infinite;
}

@keyframes ialabRingSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.ialab-connector {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: ialabDraw 1.2s cubic-bezier(0.65, 0.05, 0.36, 1) forwards;
}

@keyframes ialabDraw {
    to {
        stroke-dashoffset: 0;
    }
}

.ialab-dot {
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    animation:
        ialabDotIn 0.5s ease-out forwards,
        ialabDotPulse 2.6s ease-in-out infinite;
}

@keyframes ialabDotIn {
    from {
        opacity: 0;
        transform: scale(0.2);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes ialabDotPulse {
    0%,
    100% {
        transform: scale(1);
        filter: none;
    }

    50% {
        transform: scale(1.35);
        filter: drop-shadow(0 0 6px #2563eb);
    }
}

/* Central core */

.ialab-core {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 45.5%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background: radial-gradient(
        circle at 50% 40%,

        #ffffff 0%,

        #f6f9ff 70%,

        #e6eefb 100%
    );
    box-shadow:
        0 0 0 1px rgba(37, 99, 235, 0.08),
        0 30px 70px -20px rgba(37, 99, 235, 0.25),
        inset 0 -20px 40px rgba(37, 99, 235, 0.05),
        inset 0 0 60px rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.ialab-core-inner {
    text-align: center;
    padding: 0 24px;
}

.ialab-core-logo {
    font-size: clamp(34px, 6.5vw, 64px);
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1;
    margin-bottom: 12px;
}

.ialab-core-ia {
    color: #0f172a;
}

.ialab-core-lab {
    background: linear-gradient(135deg, #3b82f6 0%, #1e3a8a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.ialab-core-tags {
    font-size: clamp(8px, 1.05vw, 11px);
    font-weight: 600;
    color: #0f172a;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}

.ialab-core-tags span {
    color: #cbd5e1;
    margin: 0 4px;
}

.ialab-core-tagline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: clamp(9px, 1.1vw, 12px);
    color: #2563eb;
    font-weight: 500;
    font-style: italic;
}

.ialab-core-bar {
    flex: 0 0 30px;
    height: 1px;
    background: #2563eb;
}

/* Orbiting nodes */

.ialab-node {
    position: absolute;
    width: 13%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 3;
    animation: ialabNodeIn 0.6s ease-out backwards;
}

@keyframes ialabNodeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.6);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.ialab-node-circle {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background: radial-gradient(
        circle at 50% 35%,

        #ffffff 0%,

        #f4f8ff 75%,

        #e4ecfa 100%
    );
    box-shadow:
        0 0 0 1px rgba(37, 99, 235, 0.08),
        0 12px 28px -10px rgba(37, 99, 235, 0.25),
        inset 0 -6px 14px rgba(37, 99, 235, 0.04),
        inset 0 6px 14px rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.ialab-node-circle svg {
    width: 46%;
    height: 46%;
}

.ialab-node:hover .ialab-node-circle {
    transform: translateY(-3px);
    box-shadow:
        0 0 0 1px rgba(37, 99, 235, 0.18),
        0 18px 34px -10px rgba(37, 99, 235, 0.35),
        inset 0 -6px 14px rgba(37, 99, 235, 0.06);
}

.ialab-node-num {
    font-size: clamp(12px, 1.3vw, 15px);
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 2px;
}

.ialab-node-label {
    font-size: clamp(11px, 1.1vw, 13px);
    font-weight: 600;
    color: #0f172a;
    line-height: 1.3;
}

/* Position each node on the orbit (radius 35% from center) */

.ialab-node--01 {
    left: 50%;
    top: 15%;
    animation-delay: 0.05s;
}

.ialab-node--02 {
    left: 70.55%;
    top: 21.7%;
    animation-delay: 0.12s;
}

.ialab-node--03 {
    left: 83.3%;
    top: 39.2%;
    animation-delay: 0.19s;
}

.ialab-node--04 {
    left: 83.3%;
    top: 60.8%;
    animation-delay: 0.26s;
}

.ialab-node--05 {
    left: 70.55%;
    top: 78.3%;
    animation-delay: 0.33s;
}

.ialab-node--06 {
    left: 50%;
    top: 85%;
    animation-delay: 0.4s;
}

.ialab-node--07 {
    left: 29.45%;
    top: 78.3%;
    animation-delay: 0.33s;
}

.ialab-node--08 {
    left: 16.7%;
    top: 60.8%;
    animation-delay: 0.26s;
}

.ialab-node--09 {
    left: 16.7%;
    top: 39.2%;
    animation-delay: 0.19s;
}

.ialab-node--10 {
    left: 29.45%;
    top: 21.7%;
    animation-delay: 0.12s;
}

/* Responsive: collapse orbit to grid */

@media (max-width: 1024px) {
    .ialab-stage {
        aspect-ratio: auto;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 28px 20px;
        padding: 24px 0;
        max-width: 720px;
    }

    .ialab-lines,
    .ialab-core {
        display: none;
    }

    .ialab-node {
        position: static;
        transform: none;
        width: auto;
        animation: none;
    }

    .ialab-node-circle {
        width: 72px;
    }
}

@media (max-width: 640px) {
    .ialab-stage {
        grid-template-columns: repeat(2, 1fr);
        gap: 22px 14px;
    }

    .ialab-node-circle {
        width: 64px;
    }
}
