/* Integration hub — radial layout */
.integration-hub {
    position: relative;
    width: min(100%, 640px);
    aspect-ratio: 1;
    margin: 0 auto;
    --hub-logo-size: 38px;
}

.integration-hub__glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.35) 0%, rgba(59, 130, 246, 0.08) 45%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.integration-hub__lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.integration-hub__line {
    stroke: rgba(59, 130, 246, 0.22);
    stroke-width: 1;
}

.integration-hub__center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: #050810;
    border: 2.5px solid #3b82f6;
    box-shadow:
        0 0 0 6px rgba(59, 130, 246, 0.12),
        0 0 32px rgba(59, 130, 246, 0.45),
        0 0 64px rgba(59, 130, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.integration-hub__center-icon {
    width: 34px;
    height: auto;
}

.integration-hub__node {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 76px;
    transform: rotate(var(--angle)) translateX(var(--radius)) rotate(calc(-1 * var(--angle))) translate(-50%, -34px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.625rem;
    z-index: 2;
}

.integration-hub__node-icon {
    width: 68px;
    height: 68px;
    border-radius: 16px;
    background: rgba(6, 14, 30, 0.95);
    border: 1px solid rgba(59, 130, 246, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.integration-hub__logo {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: var(--hub-logo-size) !important;
    height: var(--hub-logo-size) !important;
    max-width: 100%;
    max-height: 100%;
    flex-shrink: 0;
}

.integration-hub__logo svg {
    width: 100%;
    height: 100%;
    display: block;
}

.integration-hub__node-icon--teams {
    background: rgba(68, 76, 231, 0.15);
    border-color: rgba(98, 100, 242, 0.25);
}

.integration-hub__node:hover .integration-hub__node-icon {
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.12);
}

.integration-hub__node-label {
    font-size: 0.8125rem;
    color: #c8d2e0;
    white-space: nowrap;
    font-weight: 400;
}

@media (max-width: 1023px) and (min-width: 640px) {
    .integration-hub {
        width: min(100%, 520px);
        --radius: 155px;
        --hub-logo-size: 34px;
    }
}

@media (max-width: 767px) and (min-width: 640px) {
    .integration-hub {
        --radius: 140px;
        --hub-logo-size: 32px;
    }

    .integration-hub__node-icon {
        width: 60px;
        height: 60px;
        padding: 9px;
    }

    .integration-hub__node {
        transform: rotate(var(--angle)) translateX(var(--radius)) rotate(calc(-1 * var(--angle))) translate(-50%, -30px);
    }
}

@media (max-width: 639px) {
    .integration-hub {
        width: 100%;
        aspect-ratio: auto;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 1.25rem 0.75rem;
        padding-top: 1rem;
        --hub-logo-size: 34px;
    }

    .integration-hub__glow,
    .integration-hub__lines,
    .integration-hub__center {
        display: none;
    }

    .integration-hub__node {
        position: static;
        transform: none;
        width: auto;
    }

    .integration-hub__node-icon {
        width: 64px;
        height: 64px;
        padding: 10px;
        margin: 0 auto;
    }
}

/* Category cards — stable grid (avoids single-column flash before Tailwind loads) */
.integ-categories-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .integ-categories-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .integ-categories-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Category card logo row */
.integ-logo-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.integ-logo-row__item {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Workflow diagram */
.workflow-panel {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1.25rem;
    padding: 1.5rem;
    box-shadow: inset 0 0 60px rgba(99, 102, 241, 0.05);
}

.workflow-step {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.workflow-step__icon {
    width: 36px;
    height: 36px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.workflow-arrow {
    display: flex;
    justify-content: center;
    padding: 0.25rem 0;
    color: #3b82f6;
}

/* Integration tile grid */
.integ-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 1.25rem 0.75rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.integ-tile:hover {
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.05);
}

.integ-tile__label {
    font-size: 0.75rem;
    color: #a8b5c6;
    text-align: center;
    line-height: 1.2;
}

/* Code window */
.code-window {
    border-radius: 0.875rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: #0b0d11;
}

.code-window__header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.code-window__dots {
    position: absolute;
    left: 1rem;
    display: flex;
    gap: 0.375rem;
}

.code-window__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.code-window__dot--red { background: #ff5f57; }
.code-window__dot--yellow { background: #febc2e; }
.code-window__dot--green { background: #28c840; }

.code-window__title {
    font-size: 0.75rem;
    color: #64748b;
    font-family: 'IBM Plex Sans', monospace;
}

.code-window__body {
    padding: 1.25rem 1.5rem;
    font-family: 'IBM Plex Mono', 'IBM Plex Sans', monospace;
    font-size: 0.8125rem;
    line-height: 1.7;
    overflow-x: auto;
}

.code-window__body .json-key { color: #7dd3fc; }
.code-window__body .json-str { color: #fbbf9a; }
.code-window__body .json-comment { color: #86efac; }
.code-window__body .json-sep { color: rgba(255, 255, 255, 0.15); margin: 0.75rem 0; border: none; border-top: 1px solid rgba(255, 255, 255, 0.08); }

/* Developer API panel */
.dev-api-panel {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1.25rem;
    padding: 2.5rem 2rem;
    position: relative;
    overflow: hidden;
}

.dev-api-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(ellipse at left center, rgba(59, 130, 246, 0.08), transparent 70%);
    pointer-events: none;
}

/* CTA card */
.integ-cta-card {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(30, 41, 59, 1);
    border-radius: 1.25rem;
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.integ-cta-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.1), transparent 60%);
    pointer-events: none;
}

/* Category icon gradients */
.integ-icon--crm { background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.05)); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.25); }
.integ-icon--collab { background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(139, 92, 246, 0.05)); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.25); }
.integ-icon--contact { background: linear-gradient(135deg, rgba(34, 211, 238, 0.2), rgba(34, 211, 238, 0.05)); color: #22d3ee; border: 1px solid rgba(34, 211, 238, 0.25); }
.integ-icon--identity { background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.05)); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.25); }
.integ-icon--dev { background: linear-gradient(135deg, rgba(251, 146, 60, 0.2), rgba(251, 146, 60, 0.05)); color: #fb923c; border: 1px solid rgba(251, 146, 60, 0.25); }
.integ-icon--ai { background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(236, 72, 153, 0.05)); color: #f472b6; border: 1px solid rgba(236, 72, 153, 0.25); }
