/* Base & Utilities */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(20, 184, 166, 0.3);
    color: #f1f5f9;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #020617;
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

/* Floating Card Animations */
@keyframes float1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(0.5deg); }
}
@keyframes float2 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(-0.5deg); }
}
@keyframes float3 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(0.5deg); }
}
@keyframes float4 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.float-card-1 { animation: float1 5s ease-in-out infinite; }
.float-card-2 { animation: float2 6s ease-in-out infinite 0.5s; }
.float-card-3 { animation: float3 4.5s ease-in-out infinite 1s; }
.float-card-4 { animation: float4 5.5s ease-in-out infinite 0.3s; }

/* Reveal Animations (below-fold only, progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .float-card-1, .float-card-2, .float-card-3, .float-card-4 {
        animation: none;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
    html {
        scroll-behavior: auto;
    }
}

/* Navbar */
.nav-scrolled {
    background: rgba(2, 6, 23, 0.9) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(20, 184, 166, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Mobile menu */
.mobile-menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.mobile-menu-open .menu-line:nth-child(2) {
    opacity: 0;
}
.mobile-menu-open .menu-line:nth-child(3) {
    width: 6rem;
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu-active {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* Button hover glow */
.btn-glow:hover {
    box-shadow: 0 0 40px rgba(20, 184, 166, 0.3), 0 0 80px rgba(20, 184, 166, 0.1) !important;
}

/* Gold accent line */
.gold-line {
    background: linear-gradient(90deg, transparent, #f5c54b, transparent);
    height: 1px;
}

/* Input focus animation */
input:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

/* Image hover container */
.img-zoom {
    overflow: hidden;
}
.img-zoom img {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.img-zoom:hover img {
    transform: scale(1.05);
}

/* Gradient text utility */
.gradient-text {
    background: linear-gradient(135deg, #5eead4, #f5c54b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Noise texture overlay */
.noise-overlay {
    position: relative;
}
.noise-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
}
.noise-overlay > * {
    position: relative;
    z-index: 2;
}
