/* === Base & Reset === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(94, 199, 142, 0.3);
    color: #f0f4f8;
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0d1b2e;
}
::-webkit-scrollbar-thumb {
    background: #1e3d5c;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #3d6a94;
}

/* === Hero Animations === */
@keyframes float1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -30px) scale(1.05); }
}
@keyframes float2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-15px, 20px) scale(1.03); }
}
@keyframes float3 {
    0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
    50% { transform: translate(-50%, -50%) rotate(5deg); }
}
@keyframes float4 {
    0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
    50% { transform: translate(-50%, -50%) rotate(-3deg); }
}

.hero-deco-1 { animation: float1 8s ease-in-out infinite; }
.hero-deco-2 { animation: float2 10s ease-in-out infinite; }
.hero-deco-3 { animation: float3 12s ease-in-out infinite; }
.hero-deco-4 { animation: float4 9s ease-in-out infinite; }

/* Hero entrance — only for above-the-fold, no opacity gate */
.hero-anim {
    opacity: 1;
    transform: translateY(0);
    animation: heroReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-anim:nth-child(1) { animation-delay: 0.1s; }
.hero-anim:nth-child(2) { animation-delay: 0.25s; }
.hero-anim:nth-child(3) { animation-delay: 0.4s; }
.hero-anim:nth-child(4) { animation-delay: 0.55s; }
.hero-anim:nth-child(5) { animation-delay: 0.7s; }

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

/* === Scroll Reveal (below the fold only) === */
@media (prefers-reduced-motion: no-preference) {
    .section-anim {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Service Cards === */
.service-card {
    will-change: transform;
}

/* === Gallery Items === */
.gallery-item {
    overflow: hidden;
}

/* === Testimonial Cards === */
.test-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease;
}

/* === Mobile Menu === */
.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(30, 61, 92, 0.5);
}
.mobile-link:last-child {
    border-bottom: none;
}

/* === Navbar Scroll State === */
.nav-scrolled {
    background: rgba(7, 14, 24, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(94, 199, 142, 0.1);
}

/* === Responsive === */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.1;
    }
}

/* === Focus Visible === */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid #5ec78e;
    outline-offset: 2px;
    border-radius: 4px;
}
