/* Base Reset */
:root {
    --primary: #a246e5;
}

body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    /* Base Styles */
    background-color: #121212;
    overflow-x: hidden;
    overflow-y: auto;
    font-family: 'Inter', sans-serif;
}

/* Typography Enhancements */
h1 {
    font-feature-settings: "ss01", "ss02";
    /* Try to get alternate glyphs if available in Inter */
}








@keyframes pulse-travel {
    0% {
        stroke-dashoffset: 3100;
        opacity: 0;
    }

    10% {
        opacity: 0.15;
        /* Very subtle opacity */
    }

    90% {
        opacity: 0.15;
    }

    100% {
        stroke-dashoffset: -100;
        opacity: 0;
    }
}

/* Offsets for variety */
#orbit-line-bottom-pulse {
    animation-delay: 4s;
}



/* Smooth Scrolling & Scrollbar */
html {
    scroll-behavior: smooth;
}

::-webkit-scrollbar {
    width: 0px;
    height: 0px;
    /* Hide scrollbar for immersive feel */
}

/* Hide scrollbar utility for flex/overflow containers */
.hide-scrollbar {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari and Opera */
}

/* SVG Glows */
svg line,
svg rect,
svg path {
    vector-effect: non-scaling-stroke;
}

/* Soft Wipe Animation Utilities */
.soft-wipe {
    /* Gradient: Black (Visible) -> Transparent (Hidden) */
    /* We make it large (300%) so we can slide the transition zone across */
    -webkit-mask-image: linear-gradient(90deg, black 35%, transparent 65%);
    mask-image: linear-gradient(90deg, black 35%, transparent 65%);

    -webkit-mask-size: 300% 100%;
    mask-size: 300% 100%;

    /* Start State depends on JS, but default transition prop */
    transition: width 800ms cubic-bezier(0.25, 1, 0.5, 1),
        -webkit-mask-position 800ms cubic-bezier(0.25, 1, 0.5, 1),
        mask-position 800ms cubic-bezier(0.25, 1, 0.5, 1);
}

/* Ribbon Gradient Sine Loop */
.ribbon-loop {
    background: linear-gradient(120deg,
            #ffffff 30%,
            #ab07f7 38%,
            #ffffff 48%,
            #ffffff 100%);
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: ribbonShine 4s linear infinite;
}

@keyframes ribbonShine {
    to {
        background-position: 200% center;
    }
}

/* Navbar Animations */
/* Navbar Animations */
.nav-link-item {
    opacity: 0;
    letter-spacing: 0.08rem;
    transform: translateY(10px);
    /* Mobile: subtle drop fade */
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

@media (min-width: 768px) {
    .nav-link-item {
        /* Desktop: Slide out from LEFT (behind logo) to RIGHT */
        transform: translateX(-40px);
        opacity: 0;
    }
}

.nav-menu-open .nav-link-item {
    opacity: 1;
    transform: translate(0);
}


/* Performance Utilities */
.will-change-transform {
    will-change: transform;
}

#fixed-wrapper,
#main-footer,
#gradient-canvas {
    transition: transform 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}

.will-change-opacity {
    will-change: opacity;
}

.reveal-text {
    color: rgba(255, 255, 255, 0.9);
}

/* 
   Dissolve/Fade mask for the top of the explanatory section 
   to blend it with the background gradient.
*/
.fade-top-mask {
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 150px);
    mask-image: linear-gradient(to bottom, transparent 0%, black 150px);
}

/* Explanatory Section Utilities */
#explanatory-text span {
    transition: color 0.3s ease;
}

.italic-0 {
    font-style: normal;
}

.font-serif {
    font-family: 'Instrument Serif', serif;
    font-weight: 400;
    vertical-align: baseline;
    position: relative;
    display: inline-block;
    line-height: 1;
}

#explanatory-text .font-serif {
    font-size: 1em;
}

#explanatory-text .font-serif::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0px;
    width: 100%;
    height: 1px;
    background-color: white;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

#explanatory-text .font-serif.text-white::after {
    transform: scaleX(1);
}

#explanatory-text .font-serif.text-white {
    color: white !important;
    background: none;
    -webkit-text-fill-color: initial;
    animation: none;
}

/* Mesh Gradient Logo */
.logo-mesh {
    /* Define Mask */
    -webkit-mask-image: url('assets/comn-logomark-white.svg');
    mask-image: url('assets/comn-logomark-white.svg');
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-position: center;
    mask-position: center;

    background-color: transparent;
    position: relative;
    overflow: hidden;
    /* For the pseudo-element noise */
}

/* Mesh Gradient Background */
.logo-mesh::before {
    content: '';
    position: absolute;
    inset: -50%;
    /* Larger than container for movement */
    width: 200%;
    height: 200%;

    /* Mesh Gradient Colors: f1e8fd, bd93eb, a248e1 */
    background-image:
        radial-gradient(circle at 50% 50%, #bd93eb 0%, transparent 60%),
        radial-gradient(circle at 0% 0%, #f1e8fd 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, #a248e1 0%, transparent 50%),
        radial-gradient(circle at 100% 0%, #f1e8fd 0%, transparent 50%),
        radial-gradient(circle at 0% 100%, #bd93eb 0%, transparent 50%);
    background-size: 200% 200%;
    /* Larger size for meaningful movement */
    filter: blur(12px);
    /* Smoother blur */

    animation: mesh-fluid 10s ease-in-out infinite alternate;
}

/* Noise overlay */
.logo-mesh::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.5;
    /* Use the filter but ensure z-index is correct */
    filter: url(#noiseFilter);
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 2;
}

@keyframes mesh-fluid {
    0% {
        background-position:
            50% 50%,
            /* Center */
            0% 0%,
            /* TL */
            100% 100%,
            /* BR */
            100% 0%,
            /* TR */
            0% 100%;
        /* BL */
        transform: scale(1) rotate(0deg);
    }

    25% {
        background-position:
            55% 45%,
            10% 10%,
            90% 90%,
            90% 10%,
            10% 90%;
    }

    50% {
        background-position:
            45% 55%,
            20% 5%,
            80% 95%,
            95% 20%,
            5% 80%;
        transform: scale(1.1) rotate(5deg);
    }

    75% {
        background-position:
            50% 50%,
            5% 20%,
            95% 80%,
            80% 5%,
            20% 95%;
    }

    100% {
        background-position:
            50% 50%,
            0% 0%,
            100% 100%,
            100% 0%,
            0% 100%;
        transform: scale(1) rotate(0deg);
    }
}

/* Scroll Reveal Animations */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.25, 1, 0.5, 1), transform 1s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: opacity, transform;
}

.fade-up.reveal {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 {
    transition-delay: 100ms;
}

.delay-200 {
    transition-delay: 200ms;
}

.delay-300 {
    transition-delay: 300ms;
}

/* Awwwards Accordion Specifics */
.awwwards-accordion {
    /* Optional: any parent container specific overrides */
    container-type: inline-size;
}

@media (min-width: 1024px) {

    /* Smoothly fade and width-expand the content */
    .accordion-item .accordion-content {
        transition-property: width, height, opacity;
    }
}

/* Card Interactive Text Animation */
.card-interactive .stagger-text .word {
    display: inline-block;
    opacity: 0;
    transform: translateY(10px) rotate(2deg);
    transition: opacity 0.4s ease-out, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: opacity, transform;
}

.card-interactive:hover .stagger-text .word {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
}

/* Base description container easing to allow the span animations to look good */
.card-interactive:hover .description-container {
    transition-delay: 0ms;
}

.card-interactive .description-container {
    transition-delay: 300ms;
    /* Delay closing so words can fade out */
}

/* Stagger Delays for up to 30 words */
.card-interactive:hover .stagger-text .word:nth-child(1) {
    transition-delay: 150ms;
}

.card-interactive:hover .stagger-text .word:nth-child(2) {
    transition-delay: 180ms;
}

.card-interactive:hover .stagger-text .word:nth-child(3) {
    transition-delay: 210ms;
}

.card-interactive:hover .stagger-text .word:nth-child(4) {
    transition-delay: 240ms;
}

.card-interactive:hover .stagger-text .word:nth-child(5) {
    transition-delay: 270ms;
}

.card-interactive:hover .stagger-text .word:nth-child(6) {
    transition-delay: 300ms;
}

.card-interactive:hover .stagger-text .word:nth-child(7) {
    transition-delay: 330ms;
}

.card-interactive:hover .stagger-text .word:nth-child(8) {
    transition-delay: 360ms;
}

.card-interactive:hover .stagger-text .word:nth-child(9) {
    transition-delay: 390ms;
}

.card-interactive:hover .stagger-text .word:nth-child(10) {
    transition-delay: 420ms;
}

.card-interactive:hover .stagger-text .word:nth-child(11) {
    transition-delay: 450ms;
}

.card-interactive:hover .stagger-text .word:nth-child(12) {
    transition-delay: 480ms;
}

.card-interactive:hover .stagger-text .word:nth-child(13) {
    transition-delay: 510ms;
}

.card-interactive:hover .stagger-text .word:nth-child(14) {
    transition-delay: 540ms;
}

.card-interactive:hover .stagger-text .word:nth-child(15) {
    transition-delay: 570ms;
}

.card-interactive:hover .stagger-text .word:nth-child(16) {
    transition-delay: 600ms;
}

.card-interactive:hover .stagger-text .word:nth-child(17) {
    transition-delay: 630ms;
}

.card-interactive:hover .stagger-text .word:nth-child(18) {
    transition-delay: 660ms;
}

.card-interactive:hover .stagger-text .word:nth-child(19) {
    transition-delay: 690ms;
}

.card-interactive:hover .stagger-text .word:nth-child(20) {
    transition-delay: 720ms;
}

.card-interactive:hover .stagger-text .word:nth-child(21) {
    transition-delay: 750ms;
}

.card-interactive:hover .stagger-text .word:nth-child(22) {
    transition-delay: 780ms;
}

.card-interactive:hover .stagger-text .word:nth-child(23) {
    transition-delay: 810ms;
}

.card-interactive:hover .stagger-text .word:nth-child(24) {
    transition-delay: 840ms;
}

.card-interactive:hover .stagger-text .word:nth-child(25) {
    transition-delay: 870ms;
}

.card-interactive:hover .stagger-text .word:nth-child(26) {
    transition-delay: 900ms;
}

.card-interactive:hover .stagger-text .word:nth-child(27) {
    transition-delay: 930ms;
}

.card-interactive:hover .stagger-text .word:nth-child(28) {
    transition-delay: 960ms;
}

.card-interactive:hover .stagger-text .word:nth-child(29) {
    transition-delay: 990ms;
}

.card-interactive:hover .stagger-text .word:nth-child(30) {
    transition-delay: 1020ms;
}

/* Out-animations (faster, staggered backwards or just tight) */
.card-interactive .stagger-text .word {
    transition-delay: 0ms;
}

/* Vertical Services Marquee */
.mask-vertical-edges {
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
    mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
}

.animate-marquee-vertical {
    display: flex;
    flex-direction: column;
    animation: marquee-vertical 45s linear infinite;
}

.animate-marquee-vertical:hover {
    animation-play-state: paused;
}

@keyframes marquee-vertical {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-50%);
    }
}

.service-item-anim {
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform, opacity, color;
}

/* Dim others when one is hovered */
#services-marquee-container:hover .service-item-anim:not(:hover) {
    opacity: 0.2;
    transform: scale(0.95);
    filter: blur(2px);
}

/* Highlight the hovered one */
#services-marquee-container .service-item-anim:hover {
    color: white;
    opacity: 1;
    transform: scale(1.05) translateX(-10px);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}