*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    min-height: 100vh;
}

::selection {
    background: rgba(52, 211, 153, 0.3);
    color: #f1f5f9;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* ─── Hero Orbs ─────────────────────────────────── */
.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    pointer-events: none;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.15) 0%, transparent 70%);
    top: 10%;
    right: -100px;
    animation: float-slow 8s ease-in-out infinite;
}

.orb-2 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, transparent 70%);
    bottom: 20%;
    left: -50px;
    animation: float-slow 10s ease-in-out infinite reverse;
}

@keyframes float-slow {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, -30px) scale(1.05); }
    66% { transform: translate(-15px, 20px) scale(0.95); }
}

/* ─── Scroll Reveal ─────────────────────────────── */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal[data-reveal-delay="1"] { transition-delay: 0.1s; }
.reveal[data-reveal-delay="2"] { transition-delay: 0.2s; }
.reveal[data-reveal-delay="3"] { transition-delay: 0.3s; }
.reveal[data-reveal-delay="4"] { transition-delay: 0.4s; }
.reveal[data-reveal-delay="5"] { transition-delay: 0.5s; }

.reveal.hidden-reveal {
    opacity: 0;
    transform: translateY(30px);
}

/* ─── Service Cards ─────────────────────────────── */
.service-card {
    opacity: 1;
    transform: translateY(0);
}

.service-card.hidden-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ─── Testimonial Cards ─────────────────────────── */
.testimonial-card {
    opacity: 1;
    transform: translateY(0);
}

.testimonial-card.hidden-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ─── Navbar ─────────────────────────────────────── */
.nav-scrolled #navbar {
    background: rgba(2, 6, 23, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(52, 211, 153, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ─── Input Focus States ────────────────────────── */
input:focus, textarea:focus {
    outline: none;
}

/* ─── Reduced Motion ────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal, .reveal.hidden-reveal,
    .service-card, .service-card.hidden-reveal,
    .testimonial-card, .testimonial-card.hidden-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .hero-orb {
        animation: none;
    }
    
    .animate-pulse {
        animation: none;
    }
}

/* ─── Mobile Menu Transition ────────────────────── */
#mobile-menu {
    transition: opacity 0.3s ease, max-height 0.3s ease;
}

#mobile-menu.hidden {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
}

#mobile-menu:not(.hidden) {
    opacity: 1;
    max-height: 400px;
}

/* ─── Form Error States ─────────────────────────── */
input:invalid:focus, textarea:invalid:focus {
    border-color: #f87171;
    ring: 1px solid rgba(248, 113, 113, 0.3);
}

/* ─── Utility ───────────────────────────────────── */
@media (max-width: 767px) {
    .hero-orb {
        display: none;
    }
}
