
/* ========================================
   COMPARISON — CONFIGURATION
   ======================================== */

.comparison {
    --comparison-accent: var(--primary-700, #006cff);
    --comparison-scene-width: 720px;
    --comparison-scene-height: 300px;

    position: relative;

    width: 100%;

    background: #ffffff;
    color: var(--neutral-900, #0d1014);
}


/* ========================================
   SECTION CONTAINER
   ======================================== */

.comparison .comparison__container {
    display: grid;

    grid-template-columns:
        minmax(0, 0.85fr)
        minmax(0, 1.15fr);

    align-items: center;

    width: 100%;
    max-width: 1440px;

    gap: clamp(24px, 4vw, 64px);

    margin-inline: auto;

    padding:
        32px
        clamp(24px, 4vw, 56px)
        40px;
}


/* ========================================
   SECTION CONTENT
   ======================================== */

.comparison__content {
    display: flex;
    flex-direction: column;

    align-items: flex-start;

    min-width: 0;

    gap: 20px;
}


/* ========================================
   EYEBROW
   ======================================== */

.comparison__eyebrow {
    font-size: 11px;
    font-weight: 700;

    line-height: 1.4;
    letter-spacing: 0.14em;

    text-transform: uppercase;

    color: var(--comparison-accent);
}


/* ========================================
   SECTION TITLE
   ======================================== */

.comparison__title {
    margin: 0;

    font-family: var(--font-heading);
    font-size: clamp(32px, 3.2vw, 48px);
    font-weight: 700;

    line-height: 1.15;
    letter-spacing: -0.045em;

    color: var(--neutral-900, #0d1014);
}

.comparison__title > span {
    display: block;

    margin-top: 6px;

    color: var(--comparison-accent);
}


/* ========================================
   DESCRIPTION
   ======================================== */

.comparison__description {
    max-width: 460px;

    margin: 0;

    font-size: clamp(15px, 1.2vw, 18px);
    font-weight: 400;

    line-height: 1.65;

    color: var(--neutral-700, #424b57);
}


/* ========================================
   CLOSING MESSAGE
   ======================================== */

.comparison__closing {
    margin: 0;

    font-size: 16px;
    font-weight: 600;

    line-height: 1.5;

    color: var(--comparison-accent);
}


/* ========================================
   PRODUCT VISUAL
   ======================================== */

.comparison__visual {
    position: relative;

    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;
    min-width: 0;

    isolation: isolate;
}


/* Subtle background illumination */

.comparison__visual::before {
    content: "";

    position: absolute;
    z-index: -1;

    inset: -20px;

    background: radial-gradient(
        ellipse at 70% 50%,
        rgba(0, 108, 255, 0.07) 0%,
        rgba(0, 108, 255, 0.025) 40%,
        transparent 75%
    );

    pointer-events: none;
}


/* ========================================
   CONNECTION SCENE
   ======================================== */

.comparison__scene {
    position: relative;

    width: 100%;
    max-width: var(--comparison-scene-width);
    height: var(--comparison-scene-height);

    container-type: inline-size;

    perspective: 1400px;
}


/* ========================================
   CONNECTION LINES
   ======================================== */

.comparison__connections {
    position: absolute;
    z-index: 0;

    inset: 0;

    width: 100%;
    height: 100%;

    overflow: visible;

    pointer-events: none;
}

.comparison__connection-base {
    stroke: url(#comparison-line-gradient);
    stroke-width: 1.5;

    opacity: 0.75;
}

.comparison__connection-flow {
    stroke: var(--primary-600, #3e90ff);
    stroke-width: 1.8;

    stroke-dasharray: 3 12;
    stroke-linecap: round;

    opacity: 0.8;
}

.comparison__connection-base path,
.comparison__connection-flow path {
    vector-effect: non-scaling-stroke;
}


/* ========================================
   CONNECTION ANIMATION
   ======================================== */

@keyframes comparison-flow {

    from {
        stroke-dashoffset: 30;
    }

    to {
        stroke-dashoffset: 0;
    }
}

@media (hover: hover) and (pointer: fine) {

    .comparison__visual:hover
    .comparison__connection-flow {
        animation: comparison-flow 1.6s linear infinite;
    }
}


/* ========================================
   SEPARATE TOOLS
   ======================================== */

.comparison-tool {
    --tool-rotation: 0deg;

    position: absolute;
    z-index: 2;

    display: flex;

    align-items: center;

    width: 32%;
    max-width: 190px;
    min-height: 58px;

    gap: 12px;

    padding: 10px 14px;

    border: 1px solid var(--neutral-100, #dae5f2);
    border-radius: 12px;

    background: #ffffff;

    box-shadow:
        0 3px 8px rgba(13, 30, 55, 0.035),
        0 8px 22px rgba(13, 30, 55, 0.07);

    transform:
        translateY(-50%)
        rotate(var(--tool-rotation));

    transition:
        transform 400ms cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 400ms ease,
        border-color 300ms ease;
}


/* ========================================
   TOOL POSITIONS
   ======================================== */

.comparison-tool--documents {
    --tool-rotation: -7deg;

    top: 13.333%;
    left: 3%;
}

.comparison-tool--invoices {
    --tool-rotation: 5deg;

    top: 37.333%;
    left: 8%;
}

.comparison-tool--email {
    --tool-rotation: -5deg;

    top: 61.333%;
    left: 0;
}

.comparison-tool--spreadsheets {
    --tool-rotation: 7deg;

    top: 85.333%;
    left: 6%;
}


/* ========================================
   TOOL ICON
   ======================================== */

.comparison-tool__icon {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    width: 34px;
    height: 34px;

    border-radius: 8px;

    background: var(--neutral-50, #edf1f7);
    color: var(--neutral-600, #748499);

    transition:
        background-color 300ms ease,
        color 300ms ease;
}

.comparison-tool__icon svg {
    display: block;

    width: 19px;
    height: 19px;
}


/* ========================================
   TOOL TITLE
   ======================================== */

.comparison-tool__title {
    overflow: hidden;

    font-size: 13px;
    font-weight: 600;

    line-height: 1.4;

    text-overflow: ellipsis;
    white-space: nowrap;

    color: var(--neutral-700, #424b57);
}


/* ========================================
   CONNECTED SYSTEM
   ======================================== */

.comparison-system {
    position: absolute;
    z-index: 3;

    top: 50%;
    right: 3%;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    width: 43%;
    min-height: 140px;

    gap: 14px;

    padding: 24px 18px;

    border: 1px solid var(--primary-200, #c2dbff);
    border-radius: 16px;

    background: #ffffff;

    box-shadow:
        0 4px 12px rgba(13, 30, 55, 0.04),
        0 12px 30px rgba(0, 108, 255, 0.10),
        0 24px 60px rgba(0, 108, 255, 0.08);

    transform:
        translateY(-50%)
        rotateY(-7deg)
        rotateX(4deg)
        rotateZ(-2deg);

    transition:
        transform 500ms cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 500ms ease;
}


/* ========================================
   SYSTEM LOGO
   ======================================== */

.comparison-system__logo {
    display: block;

    width: 100%;
    max-width: 190px;
    height: 42px;

    object-fit: contain;
}


/* ========================================
   SYSTEM DESCRIPTION
   ======================================== */

.comparison-system__description {
    font-size: 12px;
    font-weight: 500;

    line-height: 1.4;

    text-align: center;

    color: var(--neutral-700, #424b57);
}


/* ========================================
   CONNECTED MODULES
   ======================================== */

.comparison-system__modules {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 7px;
}

.comparison-system__modules > span {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: var(--primary-400, #7db4ff);

    transition: background-color 300ms ease;
}


/* ========================================
   HOVER EFFECTS
   ======================================== */

@media (hover: hover) and (pointer: fine) {

    .comparison-tool:hover {
        z-index: 4;

        transform:
            translateY(calc(-50% - 3px))
            rotate(0deg);

        border-color: var(--primary-200, #c2dbff);

        box-shadow:
            0 6px 16px rgba(13, 30, 55, 0.06),
            0 14px 30px rgba(13, 30, 55, 0.10);
    }

    .comparison-tool:hover .comparison-tool__icon {
        background: var(--primary-50, #edf5ff);
        color: var(--comparison-accent);
    }

    .comparison-system:hover {
        transform:
            translateY(calc(-50% - 5px))
            rotateY(0deg)
            rotateX(0deg)
            rotateZ(0deg);

        box-shadow:
            0 8px 20px rgba(13, 30, 55, 0.06),
            0 20px 48px rgba(0, 108, 255, 0.16);
    }

    .comparison__visual:hover
    .comparison-system__modules > span {
        background: var(--primary-700, #006cff);
    }
}


/* ========================================
   RESPONSIVE — TABLET
   ======================================== */

@media (max-width: 1024px) {

    .comparison .comparison__container {
        grid-template-columns: minmax(0, 1fr);

        gap: 20px;

        padding: 32px 32px 40px;
    }

    .comparison__content {
        align-items: center;

        gap: 16px;

        text-align: center;
    }

    .comparison__description {
        max-width: 620px;
    }

    .comparison__scene {
        max-width: 640px;
    }
}


/* ========================================
   RESPONSIVE — COMPACT VISUAL
   ======================================== */

@container (max-width: 500px) {

    .comparison-tool {
        width: 35%;
        min-height: 46px;

        gap: 8px;

        padding: 8px;

        border-radius: 9px;
    }

    .comparison-tool__icon {
        width: 28px;
        height: 28px;

        border-radius: 6px;
    }

    .comparison-tool__icon svg {
        width: 16px;
        height: 16px;
    }

    .comparison-tool__title {
        font-size: 11px;
    }

    .comparison-system {
        width: 44%;
        min-height: 112px;

        gap: 10px;

        padding: 14px 10px;

        border-radius: 12px;
    }

    .comparison-system__logo {
        height: 30px;
    }

    .comparison-system__description {
        font-size: 10px;
    }

    .comparison-system__modules > span {
        width: 5px;
        height: 5px;
    }
}


/* ========================================
   RESPONSIVE — MOBILE
   ======================================== */

@media (max-width: 600px) {

    .comparison {
        --comparison-scene-height: 260px;

        overflow: hidden;
    }

    .comparison .comparison__container {
        gap: 24px;

        padding: 32px 16px;
    }

    .comparison__content {
        gap: 14px;
    }

    .comparison__eyebrow {
        font-size: 10px;
    }

    .comparison__title {
        font-size: clamp(28px, 7vw, 34px);
    }

    .comparison__description {
        font-size: 15px;
        line-height: 1.6;
    }

    .comparison__closing {
        font-size: 14px;
    }
}


/* ========================================
   TOUCH DEVICES
   ======================================== */

@media (hover: none) {

    .comparison-system {
        transform: translateY(-50%);
    }
}


/* ========================================
   ACCESSIBILITY — REDUCED MOTION
   ======================================== */

@media (prefers-reduced-motion: reduce) {

    .comparison *,
    .comparison *::before,
    .comparison *::after {
        transition: none;
        animation: none;
    }

    .comparison-tool:hover,
    .comparison-system:hover {
        transform: translateY(-50%);
    }
}



/* ========================================
   COMPARISON — CENTERED LAYOUT
   ======================================== */

.comparison .comparison__container {
    grid-template-columns: minmax(0, 1fr);

    justify-items: center;

    gap: 24px;

    padding:
        32px
        clamp(24px, 4vw, 56px)
        40px;
}


/* ========================================
   CENTERED CONTENT
   ======================================== */

.comparison__content {
    align-items: center;

    width: 100%;
    max-width: 1000px;

    gap: 16px;

    text-align: center;
}

.comparison__title {
    font-size: clamp(32px, 3vw, 48px);

    line-height: 1.15;
}

.comparison__description {
    max-width: 760px;

    line-height: 1.6;
}

.comparison__closing {
    font-size: 15px;
}


/* ========================================
   CENTERED ANIMATION
   ======================================== */

.comparison__visual {
    width: 100%;
    max-width: 820px;

    margin-inline: auto;
}

.comparison__scene {
    max-width: 720px;
    height: 280px;
}

.comparison__visual::before {
    inset: -24px -40px;

    background: radial-gradient(
        ellipse at 65% 50%,
        rgba(0, 108, 255, 0.065) 0%,
        rgba(0, 108, 255, 0.025) 45%,
        transparent 75%
    );
}


/* ========================================
   RESPONSIVE — TABLET
   ======================================== */

@media (max-width: 1024px) {

    .comparison .comparison__container {
        gap: 24px;

        padding: 32px 32px 40px;
    }

    .comparison__scene {
        max-width: 640px;
        height: 280px;
    }
}


/* ========================================
   RESPONSIVE — MOBILE
   ======================================== */

@media (max-width: 600px) {

    .comparison .comparison__container {
        gap: 20px;

        padding: 28px 16px 32px;
    }

    .comparison__content {
        gap: 14px;
    }

    .comparison__title {
        font-size: clamp(28px, 7vw, 34px);
    }

    .comparison__scene {
        height: 240px;
    }

    .comparison__visual::before {
        inset: -12px;
    }
}


/* ========================================
   COMPARISON — WIDER ANIMATION
   ======================================== */

.comparison__visual {
    width: 100%;
    max-width: 1200px;

    margin-inline: auto;
}

.comparison__scene {
    width: 100%;
    max-width: 1120px;

    height: 280px;
}

.comparison-tool {
    width: 30%;
    max-width: 220px;
}

.comparison-system {
    width: 38%;
    max-width: 360px;

    right: 3%;
}

.comparison-system__logo {
    max-width: 240px;
    height: 48px;
}


/* ========================================
   RESPONSIVE — TABLET
   ======================================== */

@media (max-width: 1024px) {

    .comparison__scene {
        max-width: 880px;
    }
}


/* ========================================
   RESPONSIVE — MOBILE
   ======================================== */

@media (max-width: 600px) {

    .comparison__scene {
        height: 240px;
    }

    .comparison-tool {
        width: 35%;
    }

    .comparison-system {
        width: 44%;
    }

    .comparison-system__logo {
        height: 30px;
    }
}



/* ========================================
   COMPARISON — DYNAMIC CONNECTIONS
   ======================================== */

.comparison__connections {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    overflow: visible;

    pointer-events: none;
}

.comparison__connection-base {
    stroke: url(#comparison-line-gradient);
    stroke-width: 1.5;

    opacity: 0.75;
}

.comparison__connection-flow {
    stroke: var(--primary-600, #3e90ff);
    stroke-width: 2;

    stroke-dasharray: 3 12;
    stroke-linecap: round;

    opacity: 0.8;
}