/* ============================================================
   Hero Mockup — devices animados (CSS-only, GPU accelerated)
   ============================================================ */

.hero-mockup {
    position: relative;
    width: 100%;
    aspect-ratio: 1183 / 914;
    pointer-events: none;
    contain: layout style paint;
}

/* ========== MACBOOK ========== */
.hero-mockup__macbook {
    position: absolute;
    left: 11%;
    top: 6%;
    width: 83%;
    z-index: 1;
    filter:
        drop-shadow(0 12px 24px rgba(15, 23, 42, 0.08))
        drop-shadow(0 4px 8px rgba(15, 23, 42, 0.04));
}

.hero-mockup__mac-bezel {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: linear-gradient(180deg, #2a2a2c 0%, #0a0a0c 100%);
    border-radius: 1.4% / 2.2%;
    padding: 1.4%;
    overflow: hidden;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.hero-mockup__mac-bezel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, transparent 30%);
    pointer-events: none;
    z-index: 4;
}

.hero-mockup__mac-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 13.5%;
    aspect-ratio: 132 / 19;
    background: #050507;
    border-radius: 0 0 8px 8px;
    z-index: 5;
}

.hero-mockup__mac-notch::after {
    content: '';
    position: absolute;
    top: 26%;
    left: 50%;
    transform: translateX(-50%);
    width: 6%;
    aspect-ratio: 1;
    background: radial-gradient(circle, #2a2a2c 0%, #1a1a1c 80%);
    border-radius: 50%;
}

.hero-mockup__mac-display {
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.hero-mockup__mac-display img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.hero-mockup__mac-display::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 70%, rgba(0,0,0,0.04) 100%);
    pointer-events: none;
}

.hero-mockup__mac-base {
    height: 1.6%;
    background: linear-gradient(180deg, #d8dce1 0%, #a4a8af 50%, #74787e 100%);
    border-radius: 0 0 14px 14px;
    position: relative;
    margin: 0 -1%;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -1px 2px rgba(0, 0, 0, 0.18);
}

.hero-mockup__mac-base::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 14.5%;
    aspect-ratio: 144 / 9;
    background: linear-gradient(180deg, #4b5563 0%, #1f2937 100%);
    border-radius: 0 0 8px 8px;
}

/* ========== IPHONE ========== */
.hero-mockup__iphone {
    position: absolute;
    left: 4%;
    bottom: 6%;
    width: 26%;
    z-index: 4;
    transform: rotateZ(-1.5deg);
    transform-origin: center bottom;
    filter:
        drop-shadow(0 16px 32px rgba(15, 23, 42, 0.10))
        drop-shadow(0 4px 8px rgba(15, 23, 42, 0.06));
    animation: hero-mockup-phone-rise 1s cubic-bezier(0.16, 1, 0.3, 1) backwards;
    animation-delay: 0.2s;
}

@keyframes hero-mockup-phone-rise {
    from {
        opacity: 0;
        transform: rotateZ(-1.5deg) translateY(40px);
    }
    to {
        opacity: 1;
        transform: rotateZ(-1.5deg) translateY(0);
    }
}

.hero-mockup__phone-bezel {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 19.5;
    background: linear-gradient(180deg, #2a2a2c 0%, #0a0a0c 100%);
    border-radius: 17% / 8%;
    padding: 5%;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.07),
        inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.hero-mockup__phone-bezel::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 17% / 8%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, transparent 30%);
    pointer-events: none;
    z-index: 4;
}

.hero-mockup__phone-screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #f7f8fc 0%, #ffffff 35%);
    border-radius: 13% / 6.2%;
    overflow: hidden;
    position: relative;
}

.hero-mockup__phone-notch {
    position: absolute;
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    width: 36%;
    aspect-ratio: 88 / 27;
    background: #050507;
    border-radius: 14px;
    z-index: 5;
}

.hero-mockup__phone-display {
    width: 100%;
    height: 100%;
    padding: 19% 5% 5%;
    display: flex;
    flex-direction: column;
    gap: 2.2%;
    container-type: inline-size;
}

.hero-mockup__phone-header {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 0 2% 2%;
}

.hero-mockup__greeting {
    font-size: clamp(7px, 5.5cqw, 11px);
    font-weight: 600;
    color: #6b7280;
    letter-spacing: -0.01em;
    line-height: 1;
}

.hero-mockup__title {
    font-size: clamp(11px, 9cqw, 17px);
    font-weight: 800;
    color: #0a0e1a;
    letter-spacing: -0.025em;
    line-height: 1.1;
}

/* KPI cards com fade-in stagger */
.hero-mockup__kpi {
    background: #fff;
    border: 1px solid #eef0f5;
    border-radius: 10px;
    padding: 3% 4%;
    display: flex;
    align-items: center;
    gap: 3%;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    animation: hero-mockup-kpi-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
    animation-delay: var(--delay, 0s);
    min-width: 0;
}

@keyframes hero-mockup-kpi-in {
    from {
        opacity: 0;
        transform: translateX(-12px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-mockup__kpi-icon {
    width: clamp(20px, 18cqw, 32px);
    aspect-ratio: 1;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hero-mockup__kpi-icon svg {
    width: 50%;
    height: 50%;
    color: #fff;
}

.hero-mockup__kpi-icon--blue { background: linear-gradient(135deg, #0024f8 0%, #0030FF 100%); }
.hero-mockup__kpi-icon--green { background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%); }
.hero-mockup__kpi-icon--violet { background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%); }
.hero-mockup__kpi-icon--orange { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }

.hero-mockup__kpi-body {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.hero-mockup__kpi-label {
    font-size: clamp(6px, 4.5cqw, 9px);
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-mockup__kpi-value {
    font-size: clamp(10px, 7cqw, 15px);
    font-weight: 800;
    color: #0a0e1a;
    letter-spacing: -0.025em;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-mockup__kpi-trend {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    font-size: clamp(7px, 4.5cqw, 10px);
    font-weight: 700;
    flex-shrink: 0;
    white-space: nowrap;
    padding-left: 2%;
}

.hero-mockup__kpi-trend--up { color: #16a34a; }

/* ========== FLOATING NOTIFICATIONS ========== */
.hero-mockup__floating {
    position: absolute;
    background: #fff;
    border-radius: 14px;
    box-shadow:
        0 12px 24px rgba(15, 23, 42, 0.08),
        0 4px 8px rgba(15, 23, 42, 0.04),
        0 0 0 1px rgba(15, 23, 42, 0.04);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10;
}

.hero-mockup__floating-icon {
    width: clamp(28px, 3.4cqw, 40px);
    aspect-ratio: 1;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hero-mockup__floating-icon svg {
    width: 55%;
    height: 55%;
    color: #fff;
}

.hero-mockup__floating-icon--success { background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%); }
.hero-mockup__floating-icon--brand { background: linear-gradient(135deg, #0024f8 0%, #001592 100%); }

.hero-mockup__floating-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hero-mockup__floating-title {
    font-size: clamp(10px, 1.1cqw, 13px);
    font-weight: 700;
    color: #0a0e1a;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.hero-mockup__floating-sub {
    font-size: clamp(8px, 0.95cqw, 11px);
    font-weight: 500;
    color: #6b7280;
    line-height: 1.2;
}

.hero-mockup__floating-sub strong {
    color: #15803d;
    font-weight: 700;
}

/* Notificação "Nova venda" — slide-in repete a cada 8s */
.hero-mockup__floating--sale {
    right: 4%;
    top: 3%;
    animation: hero-mockup-notify-sale 8s ease-in-out infinite;
    animation-delay: 1.2s;
}

@keyframes hero-mockup-notify-sale {
    0%, 5% {
        opacity: 0;
        transform: translateX(20px) scale(0.95);
    }
    10%, 75% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    85%, 100% {
        opacity: 0;
        transform: translateX(20px) scale(0.95);
    }
}

/* Notificação "Estoque sincronizado" — entra com delay, loop offset */
.hero-mockup__floating--sync {
    right: 0;
    bottom: 12%;
    animation: hero-mockup-notify-sync 8s ease-in-out infinite;
    animation-delay: 4s;
}

@keyframes hero-mockup-notify-sync {
    0%, 5% {
        opacity: 0;
        transform: translateX(20px) scale(0.95);
    }
    10%, 75% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    85%, 100% {
        opacity: 0;
        transform: translateX(20px) scale(0.95);
    }
}

/* Respeito a prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .hero-mockup__iphone,
    .hero-mockup__kpi,
    .hero-mockup__floating--sale,
    .hero-mockup__floating--sync {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    .hero-mockup__iphone {
        transform: rotateZ(-1.5deg) !important;
    }
    .hero-mockup__floating--sale,
    .hero-mockup__floating--sync {
        opacity: 1 !important;
    }
}

/* ========== RESPONSIVE ========== */
/* Em telas menores que 991px, escondemos o iPhone (composição muda) */
@media (max-width: 991px) {
    .hero-mockup {
        max-width: 600px;
        margin: 0 auto;
    }
    .hero-mockup__iphone {
        display: none;
    }
    .hero-mockup__floating--sale {
        right: 0;
        top: 0;
    }
    .hero-mockup__floating--sync {
        right: -10px;
        bottom: 5%;
    }
}

@media (max-width: 600px) {
    .hero-mockup__floating {
        padding: 8px 12px;
        gap: 8px;
    }
}
