:root {
    --primary: #06b6d4;
    --primary-glow: rgba(6, 182, 212, 0.4);
    --bg: #020617;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: initial;
    /* GSAP handles smooth scroll better */
}

body {
    font-family: 'Outfit', sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Glassmorphism */
.glass-card {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(6, 182, 212, 0.3);
}

/* Typography Gradient */
.text-gradient {
    background: linear-gradient(135deg, #fff 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Animations */
@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(2deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

.float-anim {
    animation: float 8s ease-in-out infinite;
}

.reveal-type {
    overflow: hidden;
}

/* Hero Elements */
#hero-bg {
    filter: brightness(0.6);
}

.orb {
    filter: blur(120px);
}

/* Portfolio Hover */
.portfolio-item {
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.portfolio-item:hover {
    transform: translateY(-10px);
}

/* Marquee Animations */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

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

    100% {
        transform: translateX(0);
    }
}

.marquee-scroll {
    animation: marquee 40s linear infinite;
    width: max-content;
}

.marquee-scroll-reverse {
    animation: marquee-reverse 60s linear infinite;
    width: max-content;
}

.marquee-scroll:hover,
.marquee-scroll-reverse:hover {
    animation-play-state: paused;
}

/* Parallax Layers */
.parallax-layer {
    pointer-events: none;
    will-change: transform;
    background-size: cover;
    background-position: center;
}

@keyframes float-gentle {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(2deg);
    }
}

.floating-ice {
    animation: float-gentle 6s ease-in-out infinite;
}

/* Motion Refinements */
.char {
    display: inline-block;
    will-change: transform, opacity;
}

.portfolio-item img,
.glass-card {
    will-change: transform, filter;
    transition: filter 0.3s ease-out;
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .glass-card {
        padding: 1.5rem;
    }
}

/* Border Morphism - Premium Glowing Borders */
.border-morphism {
    position: relative;
    overflow: hidden;
}

.border-morphism::before {
    content: '';
    position: absolute;
    inset: -1px;
    padding: 1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(6, 182, 212, 0.3), rgba(255, 255, 255, 0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
    transition: all 0.5s ease;
}

.border-morphism:hover::before {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(6, 182, 212, 0.8), rgba(255, 255, 255, 0.2));
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
}

.border-morphism .icon-box {
    position: relative;
}

.border-morphism .icon-glow {
    position: absolute;
    inset: -10px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.border-morphism:hover .icon-glow {
    opacity: 1;
}

/* Enhancing Services Background */
#services .parallax-layer {
    filter: brightness(0.6) contrast(1.1) blur(1px);
    transition: all 1s ease;
}

#services:hover .parallax-layer {
    filter: brightness(0.8) contrast(1.2) blur(0px);
}

/* Angled Showcase - Tilted Infinite Marquee */
.angled-wrapper {
    perspective: 2000px;
    overflow: hidden;
    padding: 100px 0;
}

.angled-marquee-container {
    transform: rotateX(20deg) rotateZ(-10deg) skewX(10deg);
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 150%;
    margin-left: -25%;
}

.marquee-lane {
    display: flex;
    gap: 2rem;
    animation: marquee 25s linear infinite;
    width: max-content;
}

.marquee-lane.reverse {
    animation: marquee-reverse 25s linear infinite;
}

.showcase-card {
    width: 280px;
    height: 180px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    transition: all 0.4s ease;
    cursor: pointer;
}

.showcase-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(6, 182, 212, 0.4);
    transform: scale(1.05) translateZ(50px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.showcase-card img {
    max-width: 80%;
    max-height: 60%;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.6;
    transition: opacity 0.4s ease;
}

.showcase-card:hover img {
    opacity: 1;
}

/* Centered Hero Focus */
.hero-centered-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-scale-75 {
    transform: scale(0.75);
    transform-origin: center center;
}

/* Piercing Typography Effect */
.pierce-text {
    z-index: 10;
    position: relative;
    mix-blend-mode: exclusion;
    /* Changed back for cleaner piercing */
}

.hero-visual-wrapper {
    z-index: 50;
    /* Ensure visual is on top for piercing text behind */
    position: relative;
    pointer-events: none;
}

/* Mobile ROI Position: Under Vector */
@media (max-width: 768px) {
    #home {
        padding-top: 7.5rem;
        min-height: 110svh;
    }

    #home .hero-scale-75 {
        transform: scale(0.72);
        transform-origin: center top;
        padding-top: 2.5rem;
        padding-bottom: 4.5rem;
    }

    #home .hero-visual-wrapper {
        margin-bottom: 3.5rem;
    }

    #home .max-w-3xl {
        margin-top: 1.75rem;
    }

    #home #scroll-hint {
        bottom: 1rem;
    }

    .roi-card {
        top: 90% !important;
        right: auto !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: max-content;
        z-index: 100;
    }
}

/* Optimized Top Bar / Sticky Navigation */
#main-nav {
    transition: padding 0.35s cubic-bezier(0.4, 0, 0.2, 1), 
                background-color 0.35s cubic-bezier(0.4, 0, 0.2, 1), 
                backdrop-filter 0.35s cubic-bezier(0.4, 0, 0.2, 1), 
                border-color 0.35s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

#main-nav.scrolled {
    padding-top: 0.85rem !important;
    padding-bottom: 0.85rem !important;
    background-color: rgba(2, 6, 23, 0.8) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border-bottom-color: rgba(6, 182, 212, 0.15) !important;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5) !important;
}

/* Ensure mobile menu links look slick and have nice alignment */
#mobile-menu a {
    position: relative;
    padding-bottom: 2px;
}

#mobile-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.3s ease, left 0.3s ease;
}

#mobile-menu a:hover::after {
    width: 100%;
    left: 0;
}

/* Header Visibility Fallback — ensures header appears even if GSAP animation fails */
@keyframes headerFallbackReveal {
    to { opacity: 1; visibility: visible; }
}

#main-nav.header-anim {
    animation: headerFallbackReveal 0.01s 1.5s forwards;
}

@media (max-width: 768px) {
    #main-nav {
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* Pricing Card Styles */
.pricing-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.5rem;
    padding: 2.5rem;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.pricing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--pricing-accent, #06b6d4), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.pricing-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
}

.pricing-card:hover::before {
    opacity: 1;
}

.pricing-card.popular {
    border-color: rgba(6, 182, 212, 0.3);
    background: rgba(6, 182, 212, 0.05);
}

.pricing-card .price {
    font-size: 2.5rem;
    font-weight: 900;
    font-style: italic;
    letter-spacing: -0.05em;
    line-height: 1;
}

.pricing-card .price-currency {
    font-size: 1rem;
    font-weight: 700;
    opacity: 0.6;
    margin-left: 0.25rem;
}

.pricing-card .feature-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

.pricing-card .feature-list li:last-child {
    border-bottom: none;
}

/* intl-tel-input dark theme override */
.iti {
    width: 100%;
}

.iti__dropdown-content {
    background: #0a192f !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.iti__search-input {
    background: #020617 !important;
    color: white !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.iti__country-list {
    background: #0a192f !important;
}

.iti__country:hover,
.iti__country.iti__highlight {
    background: rgba(6, 182, 212, 0.15) !important;
}

.iti__country-name,
.iti__dial-code {
    color: white !important;
}

.iti__selected-dial-code {
    color: rgba(255, 255, 255, 0.8) !important;
}

.iti__arrow {
    border-top-color: rgba(255, 255, 255, 0.5) !important;
}

.iti__arrow--up {
    border-bottom-color: rgba(255, 255, 255, 0.5) !important;
}

.iti__country-list {
    z-index: 10500 !important;
    color: #fff !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8) !important;
}

.iti__selected-flag {
    border-top-left-radius: 0.5rem;
    border-bottom-left-radius: 0.5rem;
}

.iti__selected-flag:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
}
