/* Interactive Custom Cursor */
.custom-cursor {
    width: 8px;
    height: 8px;
    background: var(--brand-secondary);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    transition: width 0.1s, height 0.1s, background-color 0.1s;
}

.custom-cursor-ring {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(104, 64, 232, 0.4);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9998;
    transition: transform 0.08s ease-out, width 0.3s, height 0.3s, border-color 0.3s, background-color 0.3s;
}

/* Cursor Interactive States */
.custom-cursor.hovered {
    width: 12px;
    height: 12px;
    background: var(--brand-primary);
}

.custom-cursor-ring.hovered {
    width: 60px;
    height: 60px;
    border-color: var(--brand-secondary);
    background: rgba(255, 0, 122, 0.05);
}

.custom-cursor-ring.viewing::after {
    content: 'VIEW';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: 0.1em;
}

.custom-cursor-ring.viewing {
    width: 80px;
    height: 80px;
    border-color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
}

/* Infinite Floating Loop for 3D Layer Elements */
@keyframes floatY {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(1deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes floatX {
    0% { transform: translateX(0px); }
    50% { transform: translateX(-10px); }
    100% { transform: translateX(0px); }
}

.float-slow {
    animation: floatY 6s ease-in-out infinite;
}

.float-medium {
    animation: floatY 4s ease-in-out infinite;
}

/* Logo Marquee Loop */
.marquee-container {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    padding: 30px 0;
    position: relative;
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.marquee-content {
    display: inline-flex;
    align-items: center;
    gap: 120px;
    animation: marquee-run 35s linear infinite;
}

@keyframes marquee-run {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.marquee-logo-wrapper {
    width: 100px;
    height: 100px;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.55;
    transition: var(--transition-fast);
}

.marquee-logo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.4); /* Zoom in the inside logo, keeping white box boundaries intact */
    filter: grayscale(100%) invert(100%);
    transition: var(--transition-fast);
}

.marquee-logo-wrapper:hover {
    opacity: 1;
}

.marquee-logo-wrapper:hover img {
    filter: grayscale(0%) invert(0%);
    transform: scale(1.4);
}

/* Pulsing Ambient Glows */
@keyframes pulse-glow {
    0% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
    100% { opacity: 0.3; transform: scale(1); }
}

.ambient-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    animation: pulse-glow 8s ease-in-out infinite;
    z-index: 1;
}

.glow-purple {
    background: rgba(104, 64, 232, 0.2);
}

.glow-pink {
    background: rgba(255, 0, 122, 0.15);
}

/* Dynamic Line Draw for Development Process */
.process-line-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 2.5s ease-out;
}

.process-line-path.active {
    stroke-dashoffset: 0;
}

/* Service Card Interactive Hover */
.service-card-3d {
    transform-style: preserve-3d;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s;
    position: relative;
    padding: 40px;
    height: 100%;
}

.service-card-3d .card-icon {
    font-size: 2.5rem;
    color: var(--brand-primary);
    margin-bottom: 25px;
    transition: var(--transition-smooth);
    transform: translateZ(30px);
}

.service-card-3d h3 {
    transform: translateZ(40px);
    transition: var(--transition-smooth);
}

.service-card-3d p {
    transform: translateZ(25px);
    transition: var(--transition-smooth);
}

.service-card-3d ul {
    transform: translateZ(20px);
    list-style: none;
    margin-top: 20px;
}

.service-card-3d ul li {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.service-card-3d ul li::before {
    content: '\f00c'; /* FontAwesome check fallback */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.8rem;
    color: var(--brand-secondary);
}

.service-card-3d:hover {
    transform: translateZ(20px) rotateX(4deg) rotateY(-4deg);
    box-shadow: 0 20px 40px rgba(104, 64, 232, 0.15);
}

.service-card-3d:hover .card-icon {
    color: var(--brand-secondary);
    transform: translateZ(50px) scale(1.1);
}

/* Magnetic attraction logic class */
.magnetic-item {
    transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Text Word Masks Reveal style */
.word-reveal-container {
    overflow: hidden;
    display: inline-block;
}

.word-reveal-item {
    display: inline-block;
    transform: translateY(100%);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.word-reveal-item.revealed {
    transform: translateY(0);
}
