/* ============================================
   OCEANSIDE HOME & REPAIR — Custom Styles
   ============================================ */

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

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

body {
    min-height: 100vh;
}

::selection {
    background-color: #047857;
    color: #fefdf8;
}

/* ============================================
   NAVIGATION
   ============================================ */
#navbar {
    background: rgba(254, 253, 248, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(4, 120, 87, 0.08);
}

#navbar.scrolled {
    background: rgba(254, 253, 248, 0.95);
    box-shadow: 0 4px 30px rgba(4, 120, 87, 0.08);
}

/* ============================================
   HERO DECORATIVE SHAPES
   ============================================ */
.deco-circle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.deco-circle-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    animation: float-slow 8s ease-in-out infinite;
}

.deco-circle-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.1) 0%, transparent 70%);
    bottom: 10%;
    left: -50px;
    animation: float-slow 10s ease-in-out infinite reverse;
}

.deco-square {
    position: absolute;
    pointer-events: none;
}

.deco-square-1 {
    width: 80px;
    height: 80px;
    background: rgba(4, 120, 87, 0.06);
    border-radius: 20px;
    top: 25%;
    left: 5%;
    transform: rotate(45deg);
    animation: spin-slow 20s linear infinite;
}

.deco-triangle {
    position: absolute;
    pointer-events: none;
}

.deco-triangle-1 {
    width: 0;
    height: 0;
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
    border-bottom: 70px solid rgba(251, 191, 36, 0.08);
    top: 30%;
    right: 8%;
    animation: float-slow 6s ease-in-out infinite;
}

.deco-dot-group {
    position: absolute;
    pointer-events: none;
}

.deco-dots-1 {
    top: 20%;
    left: 2%;
    display: grid;
    grid-template-columns: repeat(3, 8px);
    gap: 12px;
}

.deco-dots-1::before,
.deco-dots-1::after {
    content: '';
    width: 8px;
    height: 8px;
    background: rgba(4, 120, 87, 0.15);
    border-radius: 50%;
}

.deco-dots-2 {
    bottom: 25%;
    right: 5%;
    display: grid;
    grid-template-columns: repeat(3, 6px);
    gap: 10px;
}

.deco-dots-2::before,
.deco-dots-2::after {
    content: '';
    width: 6px;
    height: 6px;
    background: rgba(251, 191, 36, 0.2);
    border-radius: 50%;
}

/* ============================================
   HERO IMAGE BLOB
   ============================================ */
@keyframes morph {
    0%, 100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
    25% {
        border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%;
    }
    50% {
        border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;
    }
    75% {
        border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%;
    }
}

.animate-morph {
    animation: morph 8s ease-in-out infinite;
}

/* ============================================
   FLOATING ANIMATIONS
   ============================================ */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(3deg); }
}

@keyframes spin-slow {
    from { transform: rotate(45deg); }
    to { transform: rotate(405deg); }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float 4s ease-in-out infinite;
    animation-delay: 2s;
}

/* ============================================
   SERVICE CARDS
   ============================================ */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #047857, #10b981, #f59e0b);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.service-card:hover::before {
    opacity: 1;
}

/* ============================================
   SCROLL REVEAL (Progressive Enhancement)
   Only activates with JS / prefers-reduced-motion
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* ============================================
   BACK TO TOP
   ============================================ */
#back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    translate: 0;
}

/* ============================================
   MOBILE MENU
   ============================================ */
.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(4, 120, 87, 0.08);
}

.mobile-link:last-child {
    border-bottom: none;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 768px) {
    .deco-circle-1 {
        width: 300px;
        height: 300px;
    }
    
    .deco-circle-2 {
        width: 200px;
        height: 200px;
    }
    
    .deco-square-1 {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 640px) {
    #navbar {
        background: rgba(254, 253, 248, 0.95);
    }
}

/* ============================================
   FORM STYLES
   ============================================ */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23047857' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

select:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

/* ============================================
   UTILITY ANIMATIONS
   ============================================ */
@keyframes pulse-ring {
    0% { transform: scale(0.95); opacity: 0.7; }
    50% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.7; }
}

.animate-pulse-ring {
    animation: pulse-ring 2s ease-in-out infinite;
}
