
/* ============================================================
   PREMIUM ANIMATION ENGINE — CSS v2
   ============================================================ */

/* ── Scroll Progress Bar ──────────────────────────────────── */
.ml-scroll-bar {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: linear-gradient(90deg, #5b50e8, #8b5cf6, #c4a261);
    transform-origin: left center;
    transform: scaleX(0);
    z-index: 9999;
    pointer-events: none;
}

/* ── Header Logo Morph ────────────────────────────────────── */
.logo-text-full {
    display: inline-block;
    max-width: 180px;
    opacity: 1;
    letter-spacing: 0.06em;
    overflow: hidden;
    white-space: nowrap;
    vertical-align: middle;
    transition: max-width 0.55s cubic-bezier(0.16,1,0.3,1),
                opacity 0.3s ease,
                letter-spacing 0.5s ease;
}
.logo-text-short {
    display: inline-block;
    max-width: 0;
    opacity: 0;
    font-weight: 700;
    letter-spacing: 0.02em;
    overflow: hidden;
    white-space: nowrap;
    vertical-align: middle;
    transition: max-width 0.55s cubic-bezier(0.16,1,0.3,1),
                opacity 0.3s ease 0.15s;
}
header.logo-collapsed .logo-text-full { max-width: 0; opacity: 0; letter-spacing: -0.04em; }
header.logo-collapsed .logo-text-short { max-width: 60px; opacity: 1; }
header.logo-collapsed .logo-icon { transform: scale(1.12); }

/* ── Cursor Glow ──────────────────────────────────────────── */
.ml-cursor-glow {
    position: fixed;
    top: 0; left: 0;
    width: 500px; height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(91,80,232,0.07) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
    will-change: transform;
    transition: background 0.4s ease;
}
.ml-cursor-glow.active {
    background: radial-gradient(circle, rgba(91,80,232,0.13) 0%, rgba(139,92,246,0.05) 50%, transparent 70%);
}
.ml-cursor-dot {
    position: fixed;
    top: 0; left: 0;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: rgba(129,140,248,0.88);
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: 9998;
    will-change: transform;
    transition: width 0.2s, height 0.2s, background 0.2s;
}
.ml-cursor-dot.active { width: 16px; height: 16px; margin: -3px; background: rgba(196,162,97,0.95); }

/* ── Card Tilt Shine ──────────────────────────────────────── */
.card-shine {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 0;
}

/* ── Hero Node Explorer ───────────────────────────────────── */
.hero-graphic-container { position: relative; overflow: visible !important; }

.node-svg {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: visible;
}
.node-line {
    stroke-width: 0.6;
    stroke-dasharray: 4 3;
    opacity: 0.35;
    animation: dash-flow 3s linear infinite;
    transition: opacity 0.3s, stroke-width 0.3s;
}
.node-line.line-active { opacity: 0.90; stroke-width: 1.2; animation-duration: 1.1s; }
@keyframes dash-flow { to { stroke-dashoffset: -28; } }

.node-explorer { position: absolute; inset: 0; z-index: 3; pointer-events: none; }

.node-center-ring {
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%,-50%);
    width: 64px; height: 64px;
    border-radius: 50%;
    border: 1.5px solid rgba(91,80,232,0.35);
    animation: center-pulse 2.8s ease-in-out infinite;
    pointer-events: none;
}
@keyframes center-pulse {
    0%, 100% { transform: translate(-50%,-50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%,-50%) scale(1.6); opacity: 0.1; }
}

.node-item {
    position: absolute;
    transform: translate(-50%,-50%);
    pointer-events: auto;
    cursor: pointer;
    z-index: 4;
}
.node-dot {
    width: 13px; height: 13px;
    border-radius: 50%;
    background: var(--nc, #5b50e8);
    box-shadow: 0 0 10px var(--nc, #5b50e8);
    transition: transform 0.35s cubic-bezier(0.16,1,0.3,1), box-shadow 0.35s ease;
    position: relative; z-index: 2;
}
.node-pulse-ring {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    width: 13px; height: 13px;
    border-radius: 50%;
    border: 1.5px solid var(--nc, #5b50e8);
    opacity: 0;
    animation: node-ping 2.8s ease-out infinite;
    pointer-events: none;
}
.node-item.pulsing .node-pulse-ring { animation-duration: 1.4s; opacity: 1; }
.node-item.pulsing .node-dot {
    transform: scale(1.5);
    box-shadow: 0 0 20px var(--nc, #5b50e8), 0 0 35px rgba(91,80,232,0.25);
}
@keyframes node-ping {
    0% { transform: translate(-50%,-50%) scale(1); opacity: 0.75; }
    100% { transform: translate(-50%,-50%) scale(3.8); opacity: 0; }
}

.node-label {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 0.60rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: rgba(200,200,255,0.65);
    white-space: nowrap;
    pointer-events: none;
    transition: color 0.3s;
}
.node-item.hovered .node-label, .node-item.pulsing .node-label { color: var(--nc, #5b50e8); }

.node-popup {
    position: absolute;
    bottom: calc(100% + 22px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 210px;
    background: rgba(7,8,25,0.96);
    border: 1px solid rgba(91,80,232,0.28);
    border-radius: 14px;
    padding: 1.1rem 1.2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.35s cubic-bezier(0.16,1,0.3,1);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 10;
    box-shadow: 0 20px 60px rgba(0,0,0,0.65);
}
.node-item.hovered .node-popup {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}
.node-popup strong { display: block; color: #f0f0ff; font-size: 0.83rem; font-weight: 700; margin-bottom: 0.45rem; }
.node-popup p { color: rgba(190,190,240,0.70); font-size: 0.74rem; line-height: 1.6; margin: 0 0 0.8rem; }
.node-link { font-size: 0.71rem; font-weight: 700; color: var(--nc, #5b50e8); text-decoration: none; letter-spacing: 0.04em; transition: color 0.2s; }
.node-link:hover { color: #fff; }
.node-item.hovered .node-dot { transform: scale(1.7); box-shadow: 0 0 22px var(--nc, #5b50e8), 0 0 44px rgba(91,80,232,0.22); }

.node-explorer-hint {
    position: absolute;
    bottom: -1.8rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 0.60rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(129,140,248,0.50);
    white-space: nowrap;
    pointer-events: none;
    animation: hint-bob 2.5s ease-in-out infinite;
    z-index: 3;
}
@keyframes hint-bob {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.5; }
    50% { transform: translateX(-50%) translateY(-4px); opacity: 0.9; }
}

/* ── Expandable Live Panels ───────────────────────────────── */
.live-panels-section { position: relative; overflow: hidden; padding: 0; }
.panels-header { padding: 5rem 0 3rem; }
.panels-header .section-header { border-top: 1px solid var(--color-border); padding-top: 3rem; margin-bottom: 0; }

.panels-wrapper {
    display: flex;
    height: 70vh;
    min-height: 460px;
    max-height: 680px;
}
.panel-item {
    flex: 0.08;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: flex 0.85s cubic-bezier(0.16,1,0.3,1);
    border-left: 1px solid rgba(255,255,255,0.05);
}
.panel-item:first-child { border-left: none; }
.panel-item.active  { flex: 1; }
.panel-item.hovered { flex: 0.18; }

.panel-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.panel-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(5,6,15,0.55) 0%, transparent 60%),
        linear-gradient(to top, rgba(5,6,15,0.92) 0%, transparent 55%);
    z-index: 1;
}

.panel-label-vertical {
    position: absolute;
    bottom: 3.5rem;
    left: 50%;
    transform: translateX(-50%) rotate(-90deg);
    transform-origin: center;
    white-space: nowrap;
    z-index: 2;
    font-family: var(--font-mono);
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(200,200,255,0.50);
    opacity: 1;
    transition: opacity 0.25s;
    pointer-events: none;
}
.panel-item.active .panel-label-vertical { opacity: 0; }

.panel-tag { font-family: var(--font-mono); font-size: 0.68rem; color: rgba(200,200,255,0.40); letter-spacing: 0.1em; display: block; margin-bottom: 0.9rem; }

.panel-content {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 3rem 3.5rem;
    z-index: 2;
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.5s 0.28s cubic-bezier(0.16,1,0.3,1),
                transform 0.5s 0.28s cubic-bezier(0.16,1,0.3,1);
    pointer-events: none;
}
.panel-item.active .panel-content { opacity: 1; transform: translateY(0); pointer-events: auto; }

.panel-content h3 {
    font-size: clamp(1.4rem, 2.2vw, 2.1rem);
    font-weight: 800; color: #f0f0ff;
    margin: 0 0 0.85rem; letter-spacing: -0.03em;
}
.panel-content p { color: rgba(200,200,255,0.70); font-size: 0.93rem; line-height: 1.7; max-width: 430px; margin: 0 0 1.75rem; }

.panel-item::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
    background: var(--panel-color, #5b50e8);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.65s cubic-bezier(0.16,1,0.3,1);
    z-index: 5;
}
.panel-item.active::after { transform: scaleX(1); }

@media (max-width: 768px) {
    .panels-wrapper { flex-direction: column; height: auto; max-height: none; }
    .panel-item { flex: none; height: 65px; border-left: none; border-top: 1px solid rgba(255,255,255,0.05); }
    .panel-item.active { height: 360px; }
    .panel-label-vertical { transform: rotate(0); bottom: 50%; left: 1.5rem; top: auto; }
    .panel-content { padding: 1.5rem 2rem; }
}

/* ── Product Carousel ─────────────────────────────────────── */
.product-carousel-wrap { position: relative; overflow: hidden; }
.carousel-track-wrapper { overflow: hidden; position: relative; }
.carousel-track { display: flex; transition: transform 0.58s cubic-bezier(0.16,1,0.3,1); will-change: transform; }
.carousel-slide { min-width: 100%; flex-shrink: 0; opacity: 0; transition: opacity 0.4s; pointer-events: none; }
.carousel-slide.active { opacity: 1; pointer-events: auto; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }

.carousel-btn {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(8,9,28,0.80);
    backdrop-filter: blur(8px);
    color: rgba(200,200,255,0.85);
    font-size: 1.4rem; line-height: 1;
    cursor: pointer; z-index: 5;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.carousel-btn:hover { background: rgba(91,80,232,0.55); border-color: rgba(91,80,232,0.65); transform: translateY(-50%) scale(1.12); color: #fff; }
.carousel-btn.prev { left: 12px; }
.carousel-btn.next { right: 12px; }

.carousel-dots-bar {
    position: absolute;
    bottom: 10px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 6px; z-index: 5;
}
.carousel-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.28); border: none; cursor: pointer; transition: background 0.25s, width 0.35s, border-radius 0.35s; padding: 0; }
.carousel-dot.active { background: rgba(91,80,232,0.95); width: 22px; border-radius: 3.5px; }

.carousel-counter { font-family: var(--font-mono); font-size: 0.68rem; color: rgba(150,150,180,0.55); margin-left: auto; padding-right: 0.5rem; letter-spacing: 0.05em; align-self: center; }

/* ── Word Reveal ──────────────────────────────────────────── */
@keyframes ml-word-in {
    from { opacity: 0; transform: translateY(22px) skewY(2deg); }
    to   { opacity: 1; transform: translateY(0) skewY(0deg); }
}
.ml-word-reveal { display: inline-block; opacity: 0; animation: ml-word-in 0.75s cubic-bezier(0.16,1,0.3,1) forwards; }

/* ── Panel video ──────────────────────────────────────────── */
.panel-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; z-index: 0; pointer-events: none; }
