/**
 * Homepage hero 3D stage. Scoped to .hs-* so the rest of the site is untouched.
 */

.hero-section {
    overflow: visible !important;
}

.hero-section .hero-visual {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 440px !important;
    height: 440px;
    position: relative;
    overflow: visible;
}

.hs-stage {
    position: relative;
    width: 100%;
    max-width: 420px;
    height: 440px;
    margin-left: auto;
    perspective: 1400px;
    perspective-origin: 50% 42%;
}

.hs-glow {
    position: absolute;
    width: 320px;
    height: 320px;
    left: 50%;
    top: 46%;
    transform: translate(-50%, -50%);
    background:
        radial-gradient(circle, rgba(45, 130, 254, 0.16) 0%, rgba(0, 217, 255, 0.08) 42%, transparent 70%);
    pointer-events: none;
}

.hs-floor {
    position: absolute;
    left: 50%;
    bottom: 42px;
    width: 280px;
    height: 36px;
    transform: translateX(-50%) rotateX(72deg);
    background: radial-gradient(ellipse, rgba(8, 12, 23, 0.12), transparent 70%);
    filter: blur(6px);
    pointer-events: none;
}

.hs-scene {
    --hs-rx: 0deg;
    --hs-ry: 0deg;
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    transform: rotateX(calc(10deg + var(--hs-rx))) rotateY(calc(-12deg + var(--hs-ry)));
    transition: transform 320ms ease;
}

.hs-scene > * {
    transform-style: preserve-3d;
}

/* ---------- Code slab ---------- */
.hs-code {
    position: absolute;
    top: 92px;
    left: 28px;
    width: 172px;
    padding: 12px 12px 10px;
    border-radius: 10px;
    background: #080C17;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 40px rgba(8, 12, 23, 0.18) !important;
    transform: translateZ(-56px) rotateY(22deg) rotateX(3deg);
    animation: hs-float-a 7s ease-in-out infinite;
}

.hs-code-dots {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 8px;
}

.hs-code-dots small {
    margin-left: auto;
    color: #6B7280 !important;
    -webkit-text-fill-color: #6B7280 !important;
    font-size: 8px;
    letter-spacing: 0.04em;
}

.hs-code-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #374151;
}

.hs-code-dots span:nth-child(1) { background: #f87171; }
.hs-code-dots span:nth-child(2) { background: #fbbf24; }
.hs-code-dots span:nth-child(3) { background: #34d399; }

.hs-code pre,
.hs-code code {
    margin: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 9.5px;
    line-height: 1.55;
    color: #d1d5db !important;
    -webkit-text-fill-color: #d1d5db !important;
    background: none !important;
    white-space: pre;
}

.hs-code code i {
    font-style: normal;
    color: #00D9FF !important;
    -webkit-text-fill-color: #00D9FF !important;
}

.hs-code code b {
    font-weight: 600;
    color: #2D82FE !important;
    -webkit-text-fill-color: #2D82FE !important;
}

.hs-code code em {
    font-style: normal;
    color: #93c5fd !important;
    -webkit-text-fill-color: #93c5fd !important;
}

.hs-code code s {
    text-decoration: none;
    color: #86efac !important;
    -webkit-text-fill-color: #86efac !important;
}

/* ---------- Device ---------- */
.hs-device {
    position: absolute;
    top: 48px;
    left: 50%;
    width: 270px;
    margin-left: -135px;
    transform: translateZ(36px);
}

.hs-lid {
    transform: rotateX(-6deg);
    transform-origin: bottom center;
}

.hs-bezel {
    position: relative;
    background: #080C17;
    border-radius: 14px;
    padding: 9px 8px 10px;
    box-shadow:
        0 24px 48px rgba(8, 12, 23, 0.22),
        0 0 0 1px rgba(255, 255, 255, 0.06) !important;
    overflow: hidden;
}

.hs-chrome {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 18px;
    margin-bottom: 7px;
    padding: 0 4px;
}

.hs-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4b5563;
}

.hs-dot:nth-child(1) { background: #f87171; }
.hs-dot:nth-child(2) { background: #fbbf24; }
.hs-dot:nth-child(3) { background: #34d399; }

.hs-url {
    margin-left: 6px;
    flex: 1;
    height: 12px;
    border-radius: 6px;
    background: #111827;
    color: #9ca3af !important;
    -webkit-text-fill-color: #9ca3af !important;
    font-size: 8px;
    line-height: 12px;
    text-align: center;
    letter-spacing: 0.02em;
}

.hs-screens {
    position: relative;
    height: 172px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
}

.hs-screen {
    position: absolute;
    inset: 0;
    padding: 10px;
    opacity: 0;
    transform: translateZ(0) scale(0.98);
    transition: opacity 420ms ease, transform 420ms ease;
}

.hs-screen.is-active {
    opacity: 1;
    transform: translateZ(0) scale(1);
}

.hs-cursor {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #2D82FE;
    background: rgba(255, 255, 255, 0.85);
    top: 0;
    left: 0;
    z-index: 3;
    transform: translate3d(78px, 118px, 0);
    animation: hs-cursor 4.8s ease-in-out infinite;
    pointer-events: none;
    will-change: transform;
}

.hs-hinge {
    height: 7px;
    margin: 0 18px;
    background: linear-gradient(180deg, #1f2937, #080C17);
    border-radius: 0 0 3px 3px;
}

.hs-base {
    height: 12px;
    margin: 0 6px;
    background: linear-gradient(180deg, #111827, #080C17);
    border-radius: 0 0 10px 10px;
    transform: rotateX(68deg);
    transform-origin: top center;
    box-shadow: 0 10px 18px rgba(8, 12, 23, 0.18) !important;
}

/* Screen 1: website / UI */
.hs-ui-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.hs-ui-nav b {
    width: 22px;
    height: 5px;
    border-radius: 3px;
    background: #d1d5db;
}

.hs-ui-nav i {
    margin-left: auto;
    width: 36px;
    height: 10px;
    border-radius: 6px;
    background: linear-gradient(90deg, #2D82FE, #00D9FF);
}

.hs-ui-hero span,
.hs-ui-hero strong,
.hs-ui-hero em {
    display: block;
    border-radius: 4px;
    background: #e5e7eb;
}

.hs-ui-hero span { width: 38%; height: 6px; }
.hs-ui-hero strong { width: 72%; height: 12px; margin: 7px 0 5px; background: #080C17; }
.hs-ui-hero em { width: 88%; height: 5px; }

.hs-ui-cta {
    width: 54px;
    height: 12px;
    margin-top: 8px;
    border-radius: 7px;
    background: linear-gradient(90deg, #2D82FE, #00D9FF);
}

.hs-ui-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 14px;
}

.hs-ui-cards i {
    display: block;
    height: 52px;
    border-radius: 7px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: none !important;
}

/* Screen 2: store + payments */
.hs-shop-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.hs-shop-head b {
    width: 70px;
    height: 8px;
    border-radius: 4px;
    background: #080C17;
}

.hs-shop-head span {
    width: 28px;
    height: 10px;
    border-radius: 5px;
    background: #e5e7eb;
}

.hs-shop-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.hs-shop-grid i {
    display: block;
    height: 58px;
    border-radius: 7px;
    background:
        linear-gradient(180deg, #eef4ff 0 58%, #ffffff 58%);
    border: 1px solid #e5e7eb;
}

.hs-pay {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.hs-pay-bar {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg, #2D82FE 70%, #e5e7eb 70%);
}

.hs-pay-btn {
    width: 48px;
    height: 14px;
    border-radius: 7px;
    background: #080C17;
}

/* Screen 3: SEO + AI */
.hs-dash {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 8px;
    height: 88px;
}

.hs-kpis {
    display: grid;
    gap: 6px;
}

.hs-kpis i {
    display: block;
    height: 24px;
    border-radius: 6px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
}

.hs-bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    padding: 6px 6px 4px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
}

.hs-bars span {
    flex: 1;
    border-radius: 3px 3px 0 0;
    background: linear-gradient(180deg, #00D9FF, #2D82FE);
    animation: hs-bar 2.8s ease-in-out infinite;
}

.hs-bars span:nth-child(1) { height: 38%; animation-delay: 0s; }
.hs-bars span:nth-child(2) { height: 62%; animation-delay: 0.15s; }
.hs-bars span:nth-child(3) { height: 48%; animation-delay: 0.3s; }
.hs-bars span:nth-child(4) { height: 80%; animation-delay: 0.45s; }
.hs-bars span:nth-child(5) { height: 55%; animation-delay: 0.6s; }
.hs-bars span:nth-child(6) { height: 70%; animation-delay: 0.75s; }

.hs-chat {
    margin-top: 8px;
    padding: 8px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
}

.hs-chat p {
    height: 8px;
    border-radius: 6px;
    margin: 0 0 6px !important;
    background: #eef4ff !important;
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
}

.hs-chat p:nth-child(2) {
    width: 68%;
    margin-left: auto !important;
    background: linear-gradient(90deg, #2D82FE, #00D9FF) !important;
}

.hs-chat-in {
    height: 11px;
    border-radius: 6px;
    background: #f3f4f6;
}

/* ---------- Service tiles ---------- */
.hs-tile {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 11px;
    border-radius: 10px;
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 10px 24px rgba(8, 12, 23, 0.08) !important;
    color: #080C17 !important;
    font-family: Inter, sans-serif;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.hs-tile i {
    color: #2D82FE !important;
    -webkit-text-fill-color: #2D82FE !important;
    font-size: 12px !important;
    width: 14px;
    text-align: center;
}

.hs-tile span {
    color: #080C17 !important;
    -webkit-text-fill-color: #080C17 !important;
}

.hs-tile-a { top: 168px; left: 8px; transform: translateZ(84px); animation: hs-float-b 6.2s ease-in-out infinite; }
.hs-tile-b { top: 40px; left: 154px; transform: translateZ(68px); animation: hs-float-a 7.4s ease-in-out infinite 0.4s; }
.hs-tile-c { top: 198px; right: 4px; transform: translateZ(96px); animation: hs-float-b 6.8s ease-in-out infinite 0.8s; }
.hs-tile-d { top: 86px; right: 8px; transform: translateZ(76px); animation: hs-float-a 5.8s ease-in-out infinite 0.2s; }
.hs-tile-e { bottom: 68px; left: 36px; transform: translateZ(58px); animation: hs-float-b 7s ease-in-out infinite 0.6s; }
.hs-tile-f { bottom: 52px; right: 22px; transform: translateZ(52px); animation: hs-float-a 6.4s ease-in-out infinite 1s; }

@media (max-width: 1199.98px) {
    .hero-section .hero-visual {
        min-height: 400px !important;
        height: 400px;
    }

    .hs-stage {
        transform: scale(0.88);
        transform-origin: center center;
        height: 400px;
    }
}

@keyframes hs-float-a {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -8px; }
}

@keyframes hs-float-b {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 7px; }
}

@keyframes hs-bar {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.72); }
}

@keyframes hs-cursor {
    0%, 100% { transform: translate3d(78px, 118px, 0); }
    35% { transform: translate3d(162px, 96px, 0); }
    70% { transform: translate3d(124px, 168px, 0); }
}

@media (prefers-reduced-motion: reduce), (hover: none) {
    .hs-tile,
    .hs-code,
    .hs-bars span,
    .hs-cursor {
        animation: none !important;
    }

    .hs-scene {
        transition: none;
    }
}
