/* ========================================
   Dr. Richard L. Hebert Jr. - Custom Styles
   ======================================== */

/* Base styles */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #f0f4f8;
}
::-webkit-scrollbar-thumb {
    background: #00D4AA;
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: #00b892;
}

/* ========================================
   Geometric Blobs
   ======================================== */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: float 8s ease-in-out infinite;
}

.blob--mint {
    background: #00D4AA;
}

.blob--blue {
    background: #4d70a3;
}

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

/* ========================================
   Scroll Reveal Animations
   (Progressive enhancement — content visible without JS)
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .reveal[data-delay="100"] { transition-delay: 0.1s; }
    .reveal[data-delay="200"] { transition-delay: 0.2s; }
    .reveal[data-delay="300"] { transition-delay: 0.3s; }
    .reveal[data-delay="400"] { transition-delay: 0.4s; }
}

/* When JS is disabled, everything is already visible — no changes needed */

/* ========================================
   Hero Animations
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
    .hero-element {
        opacity: 1;
        transform: translateY(0);
        animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }
    .hero-element:nth-child(1) { animation-delay: 0.1s; }
    .hero-element:nth-child(2) { animation-delay: 0.2s; }
    .hero-element:nth-child(3) { animation-delay: 0.3s; }
    .hero-element:nth-child(4) { animation-delay: 0.4s; }

    .hero-image {
        opacity: 1;
        transform: translateX(0);
        animation: slideRight 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
    }

    .hero-card {
        opacity: 1;
        transform: translateY(0);
        animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
    }
}

/* Default states for no-JS environments */
.hero-element {
    opacity: 1;
    transform: translateY(0);
}
.hero-image {
    opacity: 1;
    transform: translateX(0);
}
.hero-card {
    opacity: 1;
    transform: translateY(0);
}

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

@keyframes slideRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ========================================
   Navbar
   ======================================== */
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(10, 35, 66, 0.08);
}

/* ========================================
   Service Cards Hover
   ======================================== */
.service-card:hover .service-icon {
    transform: rotate(90deg);
}

.service-icon {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ========================================
   Button Ripple Effect
   ======================================== */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:active::after {
    width: 300px;
    height: 300px;
}

/* ========================================
   Counter Animation
   ======================================== */
.counter {
    display: inline-block;
}

/* ========================================
   Form Focus States
   ======================================== */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.15);
}

/* ========================================
   Mobile Menu
   ======================================== */
.mobile-link {
    transition: color 0.2s ease;
}

.mobile-link:active {
    color: #00D4AA;
}

/* ========================================
   Image Placeholder Styles
   ======================================== */
img {
    max-width: 100%;
    height: auto;
}
