.tech-diff {
    --tech-accent: #1646d8;
    --tech-cyan: #43c8f5;
    --tech-ink: #0b1730;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 112px 0 128px;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 48%, #f5f9ff 100%);
}

.tech-diff-grid-bg {
    position: absolute;
    inset: 0;
    z-index: -3;
    background-image: radial-gradient(circle, rgba(22, 70, 216, 0.2) 1.1px, transparent 1.2px);
    background-size: 24px 24px;
    mask-image: linear-gradient(to bottom, #000 12%, rgba(0, 0, 0, 0.72) 58%, transparent 100%);
    animation: tech-grid-drift 24s linear infinite;
}

.tech-diff-glow {
    position: absolute;
    z-index: -2;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.14;
    pointer-events: none;
}

.tech-diff-glow--one { top: 16%; left: -220px; background: var(--tech-cyan); }
.tech-diff-glow--two { right: -220px; bottom: 5%; background: var(--tech-accent); }
.tech-diff-container { position: relative; z-index: 1; }

.tech-diff-heading {
    width: min(780px, 100%);
    margin: 0 auto 70px;
    text-align: center;
}

.tech-diff-heading .eyebrow { margin-bottom: 18px; }
.tech-diff-heading h2 {
    margin: 0;
    color: var(--tech-ink);
    font-size: clamp(2.35rem, 5vw, 4.6rem);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.tech-diff-heading p {
    max-width: 680px;
    margin: 24px auto 0;
    color: #53637d;
    font-size: clamp(1rem, 1.5vw, 1.16rem);
    line-height: 1.75;
}

.tech-diff-layout {
    display: grid;
    grid-template-columns: repeat(3, minmax(280px, 350px));
    column-gap: 32px;
    row-gap: 28px;
    justify-content: center;
    justify-items: center;
    max-width: 1160px;
    margin: 0 auto;
}

.tech-diff-card {
    position: relative;
    display: grid;
    grid-template-rows: auto minmax(160px, 1fr);
    align-content: start;
    row-gap: 20px;
    width: 100%;
    min-height: 420px;
    padding: 74px 30px 26px;
    overflow: hidden;
    border: 1px solid rgba(22, 70, 216, 0.3);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 24px 70px rgba(11, 23, 48, 0.09), inset 0 1px 0 #fff;
    transform-style: preserve-3d;
    will-change: transform;
    scale: 1;
    transition: border-color 0.35s ease, box-shadow 0.35s ease, scale 0.45s cubic-bezier(.2,.8,.2,1);
}

.tech-diff-card::before {
    content: '';
    position: absolute;
    top: -43px;
    left: 50%;
    width: 86px;
    height: 86px;
    border: 1px solid rgba(22, 70, 216, 0.34);
    border-radius: 50%;
    background: #f8fbff;
    transform: translateX(-50%);
}

.tech-diff-card:hover {
    border-color: rgba(22, 70, 216, 0.7);
    box-shadow: 0 32px 90px rgba(22, 70, 216, 0.15), inset 0 1px 0 #fff;
    scale: 1.025;
}

.tech-diff-card--1 { grid-column: 2; grid-row: 1; }
.tech-diff-card--2 { grid-column: 1; grid-row: 2; margin-top: -116px; }
.tech-diff-card--3 { grid-column: 3; grid-row: 2; margin-top: -116px; }
.tech-diff-card--4 { grid-column: 2; grid-row: 3; margin-top: -212px; }

.tech-diff-badge {
    position: absolute;
    top: 16px;
    left: 50%;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(145deg, #1c55ed, #1135a9);
    color: #fff;
    box-shadow: 0 12px 28px rgba(22, 70, 216, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.32);
    transform: translateX(-50%) translateZ(28px) rotate(45deg);
    transition: transform 0.65s cubic-bezier(.2,.8,.2,1), box-shadow 0.4s ease;
}

.tech-diff-badge i {
    transform: rotate(-45deg);
    font-size: 17px;
    transition: transform 0.65s cubic-bezier(.2,.8,.2,1);
}
.tech-diff-card:hover .tech-diff-badge {
    transform: translateX(-50%) translateZ(36px) rotate(405deg) scale(1.08);
    box-shadow: 0 18px 36px rgba(22, 70, 216, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.42);
}
.tech-diff-card:hover .tech-diff-badge i { transform: rotate(-405deg); }
.tech-diff-card-number {
    position: absolute;
    top: 24px;
    right: 25px;
    color: rgba(22, 70, 216, 0.28);
    font: 700 11px/1 var(--font-heading-family);
    letter-spacing: 0.12em;
}

.tech-diff-card-copy { position: relative; z-index: 2; text-align: center; transform: translateZ(18px); }
.tech-diff-metric {
    display: inline-flex;
    margin-bottom: 11px;
    color: var(--tech-accent);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.tech-diff-card h3 {
    margin: 0 0 10px;
    color: var(--tech-ink);
    font-size: clamp(1.25rem, 2vw, 1.55rem);
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.tech-diff-card p { margin: 0; color: #61708a; font-size: 0.92rem; line-height: 1.65; }
.tech-diff-visual {
    position: relative;
    align-self: end;
    width: 100%;
    height: 180px;
    opacity: 0.82;
    transform: translateZ(10px);
    transform-origin: center;
    transition: transform 0.6s cubic-bezier(.2,.8,.2,1), opacity 0.4s ease;
}
.tech-diff-visual svg { display: block; width: 100%; height: 100%; overflow: visible; }
.tech-diff-visual img { display:block; width:100%; height:100%; object-fit:contain; }
.tech-diff-card--1 .tech-diff-visual svg { animation: tech-visual-breathe 5.6s ease-in-out infinite; }
.tech-diff-card--2 .tech-diff-visual svg { animation: tech-visual-drift 6.5s ease-in-out infinite; }
.tech-diff-card--3 .tech-diff-visual svg { animation: tech-visual-signal 4.8s ease-in-out infinite; }
.tech-diff-card--4 .tech-diff-visual svg { animation: tech-visual-rotate 9s ease-in-out infinite; }
.tech-diff-card:hover .tech-diff-visual { opacity: 1; transform: translateZ(28px) scale(1.075); }
.tech-diff-card--2:hover .tech-diff-visual { transform: translateZ(28px) scale(1.07) rotate(-2deg); }
.tech-diff-card--3:hover .tech-diff-visual { transform: translateZ(28px) scale(1.08) translateY(-4px); }
.tech-diff-card--4:hover .tech-diff-visual { transform: translateZ(28px) scale(1.07) rotate(3deg); }
.tech-line { fill: none; stroke: rgba(42, 69, 112, 0.52); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.tech-line--strong { stroke: var(--tech-accent); stroke-width: 2.4; }
.tech-line--dash { stroke: var(--tech-accent); stroke-dasharray: 8 8; animation: tech-dash 8s linear infinite; }
.tech-node { fill: #fff; stroke: var(--tech-accent); stroke-width: 2; transform-box: fill-box; transform-origin: center; }
.tech-node--pulse { fill: rgba(22, 70, 216, 0.12); animation: tech-node-pulse 2.8s ease-in-out infinite; }
.tech-orbit { stroke-dasharray: 5 8; animation: tech-orbit 18s linear infinite; transform-origin: 130px 90px; }
.tech-orbit--inner { animation-direction: reverse; animation-duration: 12s; }
.tech-diff-card-sheen {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at var(--sheen-x, 50%) var(--sheen-y, 20%), rgba(67, 200, 245, 0.16), transparent 38%);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.tech-diff-card:hover .tech-diff-card-sheen { opacity: 1; }

[data-tech-reveal] {
    opacity: 0;
    transform: translateY(42px) scale(0.93) rotateX(5deg);
    transform-origin: center bottom;
    transition: opacity 0.85s ease, transform 0.95s cubic-bezier(.16,1,.3,1);
    transition-delay: var(--card-delay, 0ms);
}
[data-tech-reveal].is-visible { opacity: 1; transform: translateY(0); }

.tech-diff-card[data-tech-reveal] {
    transform: translateY(48px) rotateX(8deg);
}

.tech-diff-card[data-tech-reveal].is-visible {
    animation: tech-card-zoom-in 1s cubic-bezier(.16, 1, .3, 1) var(--card-delay, 0ms) backwards;
}

.tech-diff-card.is-visible .tech-diff-badge {
    animation: tech-badge-pop 0.72s cubic-bezier(.16, 1, .3, 1) var(--badge-delay, 260ms) backwards;
}

.tech-diff-card.is-visible .tech-diff-card-copy {
    animation: tech-copy-rise 0.72s cubic-bezier(.16, 1, .3, 1) var(--copy-delay, 350ms) backwards;
}

@keyframes tech-grid-drift { to { background-position: 24px 24px; } }
@keyframes tech-dash { to { stroke-dashoffset: -64; } }
@keyframes tech-node-pulse { 50% { transform: scale(1.35); opacity: 0.62; } }
@keyframes tech-orbit { to { transform: rotate(360deg); } }
@keyframes tech-visual-breathe { 0%, 100% { transform: scale(0.96); } 50% { transform: scale(1.045); } }
@keyframes tech-visual-drift { 0%, 100% { transform: translateX(-5px) rotate(-1deg); } 50% { transform: translateX(5px) rotate(1deg) scale(1.025); } }
@keyframes tech-visual-signal { 0%, 100% { transform: translateY(3px) scale(0.98); } 50% { transform: translateY(-4px) scale(1.035); } }
@keyframes tech-visual-rotate { 0%, 100% { transform: rotate(-2deg) scale(0.98); } 50% { transform: rotate(2deg) scale(1.035); } }
@keyframes tech-card-zoom-in {
    0% { scale: 0.68; filter: blur(10px); }
    68% { scale: 1.045; filter: blur(0); }
    84% { scale: 0.985; }
    100% { scale: 1; filter: blur(0); }
}
@keyframes tech-badge-pop {
    0% { opacity: 0; transform: translateX(-50%) translateZ(28px) rotate(-135deg) scale(0.35); }
    72% { opacity: 1; transform: translateX(-50%) translateZ(28px) rotate(55deg) scale(1.12); }
    100% { opacity: 1; transform: translateX(-50%) translateZ(28px) rotate(45deg) scale(1); }
}
@keyframes tech-copy-rise {
    0% { opacity: 0; transform: translateY(18px) translateZ(18px); }
    100% { opacity: 1; transform: translateY(0) translateZ(18px); }
}

@media (min-width: 1200px) {
    .tech-diff-card.is-visible {
        animation:
            tech-card-zoom-in 1s cubic-bezier(.16, 1, .3, 1) var(--card-delay, 0ms) backwards,
            tech-card-float 8s ease-in-out calc(1s + var(--card-delay, 0ms)) infinite;
    }
    @keyframes tech-card-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
}

@media (max-width: 1199px) {
    .tech-diff { padding: 96px 0; }
    .tech-diff-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; max-width: 850px; }
    .tech-diff-card--1, .tech-diff-card--2, .tech-diff-card--3, .tech-diff-card--4 { grid-column: auto; grid-row: auto; margin-top: 0; }
    .tech-diff-card { min-height: 410px; }
}

@media (max-width: 700px) {
    .tech-diff { padding: 76px 0 84px; }
    .tech-diff-heading { margin-bottom: 48px; }
    .tech-diff-heading h2 { font-size: clamp(2.2rem, 12vw, 3.2rem); }
    .tech-diff-layout { grid-template-columns: 1fr; gap: 30px; width: min(100%, 430px); }
    .tech-diff-card {
        grid-template-rows: auto minmax(145px, 1fr);
        row-gap: 16px;
        min-height: 390px;
        padding: 72px 24px 24px;
        border-radius: 24px;
    }
    .tech-diff-visual { height: 158px; }
}

@media (prefers-reduced-motion: reduce) {
    .tech-diff-grid-bg,
    .tech-line--dash,
    .tech-node--pulse,
    .tech-orbit,
    .tech-diff-card.is-visible,
    .tech-diff-visual svg,
    .tech-diff-card.is-visible .tech-diff-badge,
    .tech-diff-card.is-visible .tech-diff-card-copy { animation: none !important; }
    [data-tech-reveal] { opacity: 1; transform: none; transition: none; }
    .tech-diff-card { transform: none !important; }
}
