: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;
    }
}
