/* ====================================================================
   BASE GRADIENTS & VISUAL FOUNDATIONS
==================================================================== */

/* Background gradient for hero/section */
.custom-charcoal-gradient {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 50%, #0f0f0f 100%);
}

/* Gradient text (for headings or highlights) */
.gradient-text {
    background: linear-gradient(135deg, #ffffff 0%, #a3a3a3 50%, #ffffff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-fill-color: transparent;
}

/* Structural visual elements */
.structural-beam {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.03) 20%, rgba(255, 255, 255, 0.03) 80%, transparent);
    height: 1px;
}

.structural-node {
    width: 12px;
    height: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05);
}

.structural-connection {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.arch-pillar {
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.02) 20%, rgba(255, 255, 255, 0.02) 80%, transparent);
    width: 1px;
}

/* Fade mask for arch/section transitions */
.arch-fade,
.arch-fade::-webkit-mask {
    mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%);
}

/* ====================================================================
   ANIMATIONS (GROUPED BY TYPE)
==================================================================== */

/* === Fade Animations === */
@keyframes heroFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scrollFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseSlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

@keyframes breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.005); }
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 0.3;
    }
}

@keyframes pulseGlow {
    0% {
        filter: brightness(0.8);
        transform: scale(0.95);
    }
    50% {
        filter: brightness(1.2) drop-shadow(0 0 8px currentColor);
        transform: scale(1.05);
    }
    100% {
        filter: brightness(0.8);
        transform: scale(0.95);
    }
}

@keyframes glow {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.8;
    }
}

@keyframes floatSlow {
    0%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    50% {
        transform: translateY(-8px) translateX(-50%);
    }
}

@keyframes float-alt {
    0%, 100% { margin-top: 0; }
    50% { margin-top: -8px; }
}

@keyframes floatingElements {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes marqueeScroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* === Scroll Pulse (for scroll indicators) === */
@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* ====================================================================
   ANIMATION CLASSES (FOR REUSE)
==================================================================== */

/* Apply animations to elements via class */
.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.6s ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease-out forwards;
}

.animate-pulse-slow {
    animation: pulseSlow 3s infinite;
}

.animate-float-slow {
    animation: floatSlow 4s ease-in-out infinite;
}

.animate-float-alt {
    animation: float-alt 2s ease-in-out infinite;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse 3s infinite;
}

.animate-pulse-glow {
    animation: pulseGlow 3s infinite;
    animation-delay: var(--delay); /* Use with CSS variable for staggered delays */
}

.animate-breathe {
    animation: breathe 4s ease-in-out infinite;
}

/* Floating background blobs */
.floating-bg {
    animation: floatingElements 8s ease-in-out infinite;
}

/* Marquee animation */
.logos-marquee {
    animation: marqueeScroll 22s linear infinite;
}

.group:hover .logos-marquee {
    animation-play-state: paused;
}

/* Reduce motion support */
@media (prefers-reduced-motion: reduce) {
    .logos-marquee,
    .floating-bg,
    .animate-pulse,
    .animate-pulse-glow,
    .animate-breathe,
    .animate-float-slow,
    .animate-float-alt,
    .animate-glow {
        animation: none !important;
    }
}

/* ====================================================================
   HERO SECTION LAYOUT
==================================================================== */

.hero-container {
    min-height: auto;
    padding-top: 10rem;
    padding-bottom: 8rem;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-content {
    max-width: 1450px;
    margin: 0 auto;
    width: 100%;
    padding: 2rem 1rem;
}

.hero-visual-container {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* Responsive hero adjustments */
@media (max-width: 1023px) {
    .hero-visual-container {
        justify-content: center;
        margin-top: 3rem;
    }
}

/* ====================================================================
   LOGO TILES & MARQUEE
==================================================================== */

.logo-tile {
    height: 72px;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-mask {
    width: 160px;
    height: 34px;
    background: #fff;
    opacity: 0.85;
    -webkit-mask-image: var(--src);
    mask-image: var(--src);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-position: center;
    mask-position: center;
}

/* ====================================================================
   PREVIEW ELEMENTS (3D CARDS)
==================================================================== */

.main-preview {
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.main-preview:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.floating-preview {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) perspective(800px) rotateY(10deg) rotateX(5deg) scale(0.9);
    z-index: 1;
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.4);
}

@media (max-width: 1023px) {
    .floating-preview {
        display: none;
    }

    .main-preview {
        transform: none;
        max-width: 100%;
    }
}

/* ====================================================================
   NODES & ECOSYSTEM (VISUAL NETWORKS)
==================================================================== */

/* Central hub */
.central-hub {
    width: 120px;
    height: 120px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 60px rgba(255, 255, 255, 0.05);
    z-index: 10;
}

.pulse-ring {
    position: absolute;
    width: 140px;
    height: 140px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: pulse 3s infinite;
}

/* Ecosystem nodes */
.ecosystem-node {
    width: 80px;
    height: 80px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    position: absolute;
}

.ecosystem-node:hover {
    transform: scale(1.15);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
    z-index: 20;
}

/* Node icons (shared across ecosystem and builder) */
.node-icon {
    width: 32px;
    height: 32px;
    opacity: 0.4;
    transition: opacity 0.3s ease;
    color: white;
    fill: none;
    stroke: currentColor;
}

.ecosystem-node:hover .node-icon {
    opacity: 1;
}

/* Node connections */
.node-connection {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform-origin: 0 0;
}

/* Node tooltip */
.node-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 16px;
    border-radius: 8px;
    width: 180px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 100;
}

.ecosystem-node:hover .node-tooltip {
    opacity: 1;
}

/* Decision node (interactive) */
.decision-node {
    transition: all 0.3s ease;
}

.decision-node:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.1);
}

/* Orbital nodes (if used) */
.orbiting-nodes circle {
    filter: drop-shadow(0 0 5px currentColor);
}

.pulse-core {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.2));
}

/* ====================================================================
   BUILDER CARDS
==================================================================== */

.builder-card {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.builder-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* ====================================================================
   GLOW EFFECTS
==================================================================== */

/* Glowing border effect (e.g., for buttons or cards) */
.glow {
    animation: glow 6s infinite;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 0 rgba(0, 255, 255, 0);
        border-color: rgba(0, 255, 255, 0.1);
    }
    50% {
        box-shadow: 0 0 6px rgba(226, 230, 137, 0.6);
        border-color: rgba(215, 240, 145, 0.151);
    }
}

/* ====================================================================
   SCROLLBAR HIDING (FOR CLEAN UI)
==================================================================== */

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* ====================================================================
   GENERAL UTILITIES
==================================================================== */

/* Optional: If you need to apply glow to any element */
.icon-pulse {
    animation: pulseGlow 3s infinite;
    animation-delay: var(--delay);
}

/* Float animate alternative */
.float-animate-alt {
    animation: float-alt 2s ease-in-out infinite;
}

/* Note: Only keep .glow-animate if you're using it separately — it was duplicate */
/* Removed duplicate .glow-animate since .animate-glow already exists */