/* DataPulseX — Motion layer (3D hero, float chips, parallax) */

.inst-hero-visual--motion {
    position: relative;
    min-height: 460px;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 2000px;
}

.inst-hero-ambient {
    position: absolute;
    inset: -18% -12%;
    pointer-events: none;
    overflow: visible;
    transform-style: preserve-3d;
}

.inst-hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(72px);
    opacity: 0.55;
    will-change: transform;
}

.inst-hero-blob--a {
    width: 320px;
    height: 320px;
    top: 0;
    right: -4%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.42), transparent 68%);
    animation: instBlobDriftA 14s ease-in-out infinite;
}

.inst-hero-blob--b {
    width: 260px;
    height: 260px;
    bottom: 4%;
    left: -8%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.34), transparent 68%);
    animation: instBlobDriftB 18s ease-in-out infinite;
}

.inst-hero-blob--c {
    width: 180px;
    height: 180px;
    top: 42%;
    right: 18%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.22), transparent 70%);
    animation: instBlobDriftC 22s ease-in-out infinite;
}

.inst-hero-grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse 75% 70% at 50% 42%, #000 15%, transparent 78%);
    -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 42%, #000 15%, transparent 78%);
    transform: rotateX(58deg) scale(1.15);
    transform-origin: center 60%;
    opacity: 0.85;
}

/* Anel luminoso 3D */
.inst-hero-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(92%, 420px);
    aspect-ratio: 1;
    margin: -46% 0 0 -46%;
    border-radius: 50%;
    border: 1px solid rgba(0, 212, 255, 0.14);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.03) inset,
        0 0 80px rgba(0, 212, 255, 0.08);
    transform: rotateX(72deg);
    animation: instRingSpin 28s linear infinite;
    opacity: 0.7;
}

.inst-hero-ring::before,
.inst-hero-ring::after {
    content: '';
    position: absolute;
    inset: 14%;
    border-radius: 50%;
    border: 1px dashed rgba(0, 212, 255, 0.12);
}

.inst-hero-ring::after {
    inset: 28%;
    border-style: solid;
    border-color: rgba(139, 92, 246, 0.1);
}

/* Orbes flutuantes */
.inst-hero-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    will-change: transform;
    box-shadow:
        0 0 32px rgba(0, 212, 255, 0.25),
        inset -8px -12px 24px rgba(0, 0, 0, 0.35),
        inset 8px 8px 18px rgba(255, 255, 255, 0.12);
}

.inst-hero-orb--1 {
    width: 54px;
    height: 54px;
    top: 8%;
    right: 6%;
    background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.45), rgba(0, 212, 255, 0.55) 42%, rgba(0, 100, 140, 0.9) 100%);
    animation: instOrbFloatA 7s ease-in-out infinite;
}

.inst-hero-orb--2 {
    width: 36px;
    height: 36px;
    bottom: 22%;
    right: 2%;
    background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.4), rgba(139, 92, 246, 0.6) 45%, rgba(60, 30, 120, 0.95) 100%);
    animation: instOrbFloatB 9s ease-in-out infinite;
}

.inst-hero-orb--3 {
    width: 28px;
    height: 28px;
    top: 36%;
    left: 4%;
    background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.35), rgba(16, 185, 129, 0.55) 45%, rgba(4, 80, 60, 0.95) 100%);
    animation: instOrbFloatC 11s ease-in-out infinite;
}

/* Palco 3D */
.inst-hero-stage {
    position: relative;
    z-index: 2;
    width: min(100%, 480px);
    margin-inline: auto;
    perspective: 1800px;
    transform-style: preserve-3d;
    animation: instStageFloat 9s ease-in-out infinite;
}

.inst-hero-stage__inner {
    position: relative;
    transform-style: preserve-3d;
    transform: rotateY(-15deg) rotateX(7deg);
    transition: transform 0.12s ease-out;
    will-change: transform;
}

.inst-hero-stage__shadow {
    position: absolute;
    left: 6%;
    right: 6%;
    bottom: -28px;
    height: 56px;
    background: radial-gradient(ellipse, rgba(0, 212, 255, 0.28), transparent 72%);
    filter: blur(20px);
    transform: translateZ(-64px) rotateX(88deg) scale(1.1);
    opacity: 0.85;
    pointer-events: none;
}

.inst-hero-stage__rim {
    position: absolute;
    inset: -2px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.35), transparent 40%, transparent 60%, rgba(139, 92, 246, 0.25));
    transform: translateZ(28px);
    opacity: 0.55;
    pointer-events: none;
    mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
    -webkit-mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
    mask-composite: exclude;
    -webkit-mask-composite: xor;
    padding: 1px;
}

.inst-hero-stage__plate {
    position: absolute;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    pointer-events: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.inst-hero-stage__plate--deep {
    inset: 28px -28px -36px 28px;
    background: linear-gradient(155deg, rgba(6, 12, 28, 0.72), rgba(4, 8, 18, 0.88));
    transform: translateZ(-72px) rotateY(-6deg) rotateX(2deg);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.45);
}

.inst-hero-stage__plate--mid {
    inset: 18px -20px -24px 20px;
    background: linear-gradient(160deg, rgba(8, 16, 34, 0.82), rgba(6, 10, 22, 0.92));
    transform: translateZ(-40px) rotateY(-4deg) rotateX(1deg);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.38);
}

.inst-hero-visual--motion .inst-hero-tech {
    position: relative;
    min-height: 360px;
    transform: translateZ(40px);
    border-radius: 14px;
    overflow: visible;
    box-shadow:
        0 48px 96px rgba(0, 0, 0, 0.62),
        0 0 0 1px rgba(255, 255, 255, 0.08),
        0 0 64px rgba(0, 212, 255, 0.12),
        -18px 24px 48px rgba(0, 0, 0, 0.35);
}

.inst-hero-visual--motion .inst-hero-tech::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.06) 0%, transparent 42%, rgba(0, 212, 255, 0.04) 100%);
    pointer-events: none;
    z-index: 4;
}

.inst-hero-tech-scan {
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: inherit;
    overflow: hidden;
    pointer-events: none;
}

.inst-hero-tech-scan::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 42%;
    top: -45%;
    background: linear-gradient(180deg, transparent, rgba(0, 212, 255, 0.06), transparent);
    animation: instTechScan 5.5s ease-in-out infinite;
}

.inst-hero-tech-card--back {
    position: absolute !important;
    inset: auto 12% 18% 12% !important;
    margin: 0 !important;
    padding: 16px !important;
    z-index: 1 !important;
    transform: translateZ(-18px) translateY(12px) scale(0.96);
    opacity: 0.72;
    border-color: rgba(0, 212, 255, 0.12) !important;
    background: rgba(4, 10, 22, 0.55) !important;
    min-height: 88px;
}

.inst-hero-spark {
    display: block;
    width: 100%;
    height: 56px;
}

.inst-hero-spark-line {
    stroke-dasharray: 280;
    stroke-dashoffset: 280;
    animation: instSparkDraw 3.2s ease forwards, instSparkPulse 4s ease-in-out 3.2s infinite;
}

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

@keyframes instSparkPulse {
    0%, 100% { opacity: 0.75; }
    50% { opacity: 1; }
}

/* Float chips (KPIs flutuantes em 3D) */
.inst-float-chip {
    position: absolute;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(8, 14, 30, 0.82);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.5),
        0 0 24px rgba(0, 212, 255, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    font-size: 12px;
    color: var(--inst-ink-soft);
    white-space: nowrap;
    pointer-events: none;
    transform-style: preserve-3d;
    transition: transform 0.12s ease-out;
}

.inst-float-chip strong {
    display: block;
    font-family: var(--inst-display);
    font-size: 15px;
    font-weight: 600;
    color: var(--inst-ink);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.inst-float-chip small {
    display: block;
    font-size: 10px;
    color: var(--inst-ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.inst-float-chip i {
    font-size: 20px;
    color: var(--inst-accent);
    flex-shrink: 0;
}

.inst-float-chip--tl { top: 2%; left: -8%; }
.inst-float-chip--tr { top: 10%; right: -10%; }
.inst-float-chip--br { bottom: 14%; right: -6%; }

.inst-float-chip--live i {
    color: #10b981;
    animation: instLiveDot 1.6s ease infinite;
}

/* Camadas com profundidade no tilt */
[data-tilt-layer] {
    transform-style: preserve-3d;
}

/* Scroll reveal com stagger */
.inst-reveal-stagger > * {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.65s var(--inst-ease), transform 0.65s var(--inst-ease);
}

.inst-reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.05s; }
.inst-reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.12s; }
.inst-reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.19s; }
.inst-reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.26s; }
.inst-reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.33s; }

.inst-reveal-stagger.is-visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* Cards com lift no hover */
.inst-pillar,
.inst-sol-card {
    transition: transform 0.35s var(--inst-ease), border-color 0.35s, box-shadow 0.35s;
}

.inst-pillar:hover,
.inst-sol-card:hover {
    transform: translateY(-6px);
    border-color: var(--inst-line-strong);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
}

@keyframes instBlobDriftA {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-28px, 22px) scale(1.1); }
}

@keyframes instBlobDriftB {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(24px, -18px) scale(1.08); }
}

@keyframes instBlobDriftC {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-14px, -20px) scale(1.12); }
}

@keyframes instRingSpin {
    from { transform: rotateX(72deg) rotateZ(0deg); }
    to { transform: rotateX(72deg) rotateZ(360deg); }
}

@keyframes instOrbFloatA {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(-10px, 14px, 12px); }
}

@keyframes instOrbFloatB {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(12px, -10px, 8px); }
}

@keyframes instOrbFloatC {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(-8px, 12px, 6px); }
}

@keyframes instStageFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes instLiveDot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

@keyframes instTechScan {
    0% { top: -45%; opacity: 0; }
    12% { opacity: 1; }
    100% { top: 110%; opacity: 0; }
}

@media (max-width: 960px) {
    .inst-hero-visual--motion { min-height: 360px; }
    .inst-float-chip--tl { left: -2%; }
    .inst-float-chip--tr { right: -2%; }
    .inst-float-chip--br { right: 0; }
    .inst-hero-orb--1 { right: 2%; }
}

@media (max-width: 768px) {
    .inst-hero-stage { animation: none; }
    .inst-hero-stage__inner {
        transform: none !important;
    }
    .inst-hero-stage__plate,
    .inst-hero-stage__rim,
    .inst-hero-ring,
    .inst-hero-orb,
    .inst-hero-tech-card--back {
        display: none;
    }
    .inst-float-chip { display: none; }
    .inst-hero-visual--motion .inst-hero-tech {
        transform: none;
        box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
    }
}

@media (prefers-reduced-motion: reduce) {
    .inst-hero-blob,
    .inst-hero-ring,
    .inst-hero-orb,
    .inst-hero-stage,
    .inst-float-chip,
    .inst-float-chip--live i,
    .inst-hero-stage__inner,
    .inst-hero-tech-scan::after,
    .inst-hero-spark-line {
        animation: none !important;
    }
    .inst-hero-stage__inner {
        transform: rotateY(-10deg) rotateX(4deg) !important;
        transition: none !important;
    }
    .inst-reveal-stagger > * {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .inst-hero-spark-line { stroke-dashoffset: 0; }
}
