:root {
    --bg-primary: #f6f9ff;
    --bg-card: rgba(255, 255, 255, 0.86);
    --bg-card-strong: rgba(255, 255, 255, 0.94);
    --border-subtle: rgba(59, 130, 246, 0.14);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --blue-400: #3b82f6;
    --blue-500: #2563eb;
    --blue-600: #1d4ed8;
    --purple-400: #8b5cf6;
    --green-400: #10b981;
    --dark-900: #0f172a;
    --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.08);
    --shadow-strong: 0 28px 70px rgba(37, 99, 235, 0.12);
}

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

html {
    scroll-behavior: smooth;
}

body {
    position: relative;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1260px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
}

.integrations-background {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(130px);
    opacity: 0.5;
}

.orb-a {
    top: 8%;
    left: -10%;
    width: 360px;
    height: 360px;
    background: rgba(59, 130, 246, 0.16);
}

.orb-b {
    top: 16%;
    right: -10%;
    width: 420px;
    height: 420px;
    background: rgba(139, 92, 246, 0.14);
}

.orb-c {
    bottom: 8%;
    left: 25%;
    width: 480px;
    height: 480px;
    background: rgba(16, 185, 129, 0.08);
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 50;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(14px);
}

.navbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--blue-500), var(--purple-400));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon svg {
    width: 20px;
    height: 20px;
    color: #fff;
    fill: currentColor;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.logo-text span {
    color: var(--blue-400);
}

.nav-links {
    display: none;
    align-items: center;
    gap: 2rem;
}

@media (min-width: 992px) {
    .nav-links {
        display: flex;
    }
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--blue-500);
}

.btn-primary,
.btn-dark,
.btn-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0.95rem 1.6rem;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
    color: #fff;
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.2);
}

.btn-dark {
    background: var(--dark-900);
    color: #fff;
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.16);
}

.btn-light {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(37, 99, 235, 0.14);
    color: var(--blue-500);
}

.btn-primary:hover,
.btn-dark:hover,
.btn-light:hover {
    transform: translateY(-1px);
}

.integrations-page {
    position: relative;
    z-index: 1;
}

.integrations-hero {
    padding: 128px 0 64px;
}

.hero-head {
    max-width: 860px;
    margin-bottom: 2rem;
}

.page-chip,
.section-chip {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.12);
    color: var(--blue-500);
    font-size: 0.84rem;
    font-weight: 700;
}

.page-chip.small {
    min-height: 34px;
    padding: 0.4rem 0.8rem;
    font-size: 0.76rem;
}

.page-title {
    margin-top: 1rem;
    font-size: clamp(2.3rem, 5vw, 4.2rem);
    line-height: 0.98;
    letter-spacing: -0.055em;
    font-weight: 800;
    max-width: 100%;
}

.page-subtitle {
    margin-top: 1rem;
    max-width: 50rem;
    font-size: 1.05rem;
    line-height: 1.84;
    color: var(--text-secondary);
}

.hero-scene {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    align-items: center;
}

.scene-card,
.structure-item,
.matrix-shell,
.panel-box,
.final-box {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

.scene-card {
    position: relative;
    border-radius: 1.8rem;
    padding: 1.5rem;
    min-height: 240px;
    z-index: 2;
}

.scene-card-middle {
    background: linear-gradient(180deg, rgba(239, 246, 255, 0.98), rgba(255, 255, 255, 0.94));
    box-shadow: var(--shadow-strong);
}

.scene-label {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-weight: 700;
}

.scene-card h2 {
    margin-top: 1rem;
    font-size: 1.9rem;
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text-primary);
}

.scene-card p {
    margin-top: 0.7rem;
    font-size: 0.96rem;
    line-height: 1.72;
    color: var(--text-secondary);
    max-width: 24rem;
}

.scene-arrow {
    position: absolute;
    top: 50%;
    width: 72px;
    height: 2px;
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.16), rgba(139, 92, 246, 0.16));
    z-index: 1;
}

.scene-arrow::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    width: 10px;
    height: 10px;
    border-top: 2px solid rgba(139, 92, 246, 0.3);
    border-right: 2px solid rgba(139, 92, 246, 0.3);
    transform: translateY(-50%) rotate(45deg);
}

.arrow-1 {
    left: calc(33.333% - 36px);
}

.arrow-2 {
    right: calc(33.333% - 36px);
}

.integrations-structure,
.integrations-matrix,
.integrations-panels,
.integrations-final {
    padding: 0 0 96px;
}

.section-grid {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 1rem;
    align-items: start;
}

.section-title {
    margin-top: 0.9rem;
    font-size: clamp(1.9rem, 4vw, 3rem);
    line-height: 1.06;
    letter-spacing: -0.045em;
    font-weight: 800;
    color: var(--text-primary);
}

.section-text {
    margin-top: 0.9rem;
    max-width: 44rem;
    font-size: 1rem;
    line-height: 1.82;
    color: var(--text-secondary);
}

.structure-list {
    display: grid;
    gap: 0.9rem;
}

.structure-item {
    border-radius: 1.45rem;
    padding: 1rem 1.1rem;
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.structure-index {
    width: 70px;
    height: 70px;
    border-radius: 1.2rem;
    background: linear-gradient(135deg, var(--blue-500), var(--purple-400));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 800;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.18);
}

.structure-body h3 {
    font-size: 1.05rem;
    line-height: 1.3;
    font-weight: 800;
    color: var(--text-primary);
}

.structure-body p {
    margin-top: 0.4rem;
    font-size: 0.94rem;
    line-height: 1.68;
    color: var(--text-secondary);
}

.matrix-shell {
    border-radius: 1.9rem;
    padding: 1.3rem;
    overflow: hidden;
}

.matrix-head {
    margin-bottom: 1rem;
}

.matrix-table {
    overflow-x: auto;
}

.matrix-row {
    display: grid;
    grid-template-columns: 1.8fr repeat(4, minmax(120px, 1fr));
}

.matrix-header {
    background: rgba(37, 99, 235, 0.04);
    border-radius: 1rem 1rem 0 0;
}

.matrix-row:not(:last-child) {
    border-bottom: 1px solid rgba(37, 99, 235, 0.08);
}

.matrix-cell {
    min-height: 68px;
    padding: 1rem 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.92rem;
    color: var(--text-primary);
}

.matrix-cell.feature {
    justify-content: flex-start;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
}

.matrix-header .matrix-cell {
    font-weight: 700;
    color: var(--text-primary);
}

.matrix-cell.yes::before {
    content: "";
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue-500), var(--purple-400));
    box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.1);
}

.matrix-cell.current {
    font-weight: 700;
    color: var(--blue-500);
}

.panels-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.panel-box {
    border-radius: 1.6rem;
    padding: 1.4rem;
    min-height: 100%;
}

.panel-box.accent {
    background: linear-gradient(180deg, rgba(239, 246, 255, 0.98), rgba(255, 255, 255, 0.94));
}

.panel-box.dark {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94));
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.panel-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--blue-500);
    font-size: 0.74rem;
    font-weight: 700;
}

.panel-box.dark .panel-kicker {
    background: rgba(255, 255, 255, 0.08);
    color: #dbeafe;
}

.panel-box h3 {
    margin-top: 0.9rem;
    font-size: 1.12rem;
    line-height: 1.3;
    font-weight: 800;
    color: var(--text-primary);
}

.panel-box p {
    margin-top: 0.45rem;
    font-size: 0.94rem;
    line-height: 1.72;
    color: var(--text-secondary);
}

.panel-box.dark h3,
.panel-box.dark p {
    color: #f8fafc;
}

.final-box {
    border-radius: 2rem;
    padding: 1.8rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
}

.final-copy h2 {
    margin-top: 0.85rem;
    font-size: clamp(1.9rem, 4vw, 3rem);
    line-height: 1.06;
    letter-spacing: -0.045em;
    font-weight: 800;
    color: var(--text-primary);
    max-width: 15ch;
}

.final-copy p {
    margin-top: 0.75rem;
    max-width: 42rem;
    font-size: 1rem;
    line-height: 1.78;
    color: var(--text-secondary);
}

.final-actions {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    min-width: 280px;
}

@media (max-width: 1200px) {
    .hero-scene,
    .section-grid,
    .final-box {
        grid-template-columns: 1fr;
    }

    .scene-arrow {
        display: none;
    }

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

    .final-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 900px) {
    .matrix-row {
        min-width: 760px;
    }

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

@media (max-width: 767px) {
    .integrations-hero {
        padding-top: 112px;
    }

    .page-title {
        max-width: none;
    }

    .scene-card,
    .matrix-shell,
    .panel-box,
    .final-box {
        padding: 1.2rem;
    }

    .btn-dark,
    .btn-light {
        width: 100%;
    }
}

@media (max-width: 991px) {
    .btn-primary {
        display: none;
    }
}
