/* ============================================
   CHAVENA CONSTRUCTION — CUSTOM STYLES
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background-color: #064e3b;
    color: #fefdf8;
}

/* ============================================
   NAVIGATION
   ============================================ */

#navbar {
    background: transparent;
    border-bottom: 1px solid transparent;
}

#navbar.scrolled {
    background: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom-color: rgba(6, 78, 59, 0.08);
    box-shadow: 0 1px 20px rgba(6, 78, 59, 0.06);
}

/* Mobile Menu */
#mobileMenu {
    box-shadow: none;
}

#mobileMenu.open {
    box-shadow: -10px 0 40px rgba(6, 78, 59, 0.1);
}

/* Hamburger Animation */
.menu-line {
    display: block;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#menuBtn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
    margin-left: 0;
}

/* ============================================
   HERO SECTION
   ============================================ */

#hero {
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(6, 78, 59, 0.04) 0%, transparent 70%);
    pointer-events: none;
}

#hero::after {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(6, 78, 59, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

/* ============================================
   SERVICE CARDS
   ============================================ */

.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #34d399, #6ee7b7);
    transition: width 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-card:hover::after {
    width: 100%;
}

/* ============================================
   PROJECT CARDS
   ============================================ */

.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* ============================================
   FORM STYLES
   ============================================ */

input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(6, 78, 59, 0.08);
}

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='%23064e3b' stroke-width='2' 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;
}

/* ============================================
   SCROLL REVEAL (Progressive Enhancement)
   ============================================ */

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .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; }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 767px) {
    .font-serif {
        word-spacing: -0.02em;
    }
}

@media (min-width: 768px) {
    /* Subtle pattern on cream backgrounds */
    .bg-cream-50,
    .bg-cream-100 {
        background-image: radial-gradient(circle at 1px 1px, rgba(6, 78, 59, 0.03) 1px, transparent 0);
        background-size: 40px 40px;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Focus visible for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #064e3b;
    outline-offset: 2px;
}
