/* ===== Base & Typography ===== */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

::selection {
    background-color: rgba(5, 150, 105, 0.2);
    color: #064e3b;
}

/* ===== Animations ===== */
@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fade-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ===== Scroll Indicator ===== */
.scroll-indicator {
    opacity: 0.6;
    animation: float 2.5s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, 8px); }
}

/* ===== Button Styles ===== */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary:hover::after {
    opacity: 1;
}

.btn-secondary {
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ===== Navigation ===== */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #059669, #10b981);
    transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 1px;
}

.nav-link:hover::after {
    width: 100%;
}

/* ===== Section Styles ===== */
.section-label {
    letter-spacing: 0.2em;
}

.section-title {
    line-height: 1.1;
}

/* ===== Services Grid ===== */
.services-grid {
    perspective: 1000px;
}

.service-card {
    transform-style: preserve-3d;
    will-change: transform;
}

/* ===== Gallery ===== */
.gallery-item {
    cursor: pointer;
    position: relative;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(6, 78, 59, 0.3) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: inherit;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* ===== Form Styles ===== */
.form-input {
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.form-input:focus {
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.form-input option {
    background-color: #fefdf8;
    color: #064e3b;
}

/* ===== Social Icons ===== */
.social-icon {
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.social-icon:hover {
    transform: translateY(-2px);
}

/* ===== Mobile Menu ===== */
.menu-line {
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.menu-open .menu-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-8px);
}

.menu-open .menu-line:nth-child(3) {
    width: 20px;
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-link {
    transition: all 0.3s ease;
}

.mobile-link:hover {
    transform: translateX(8px);
}

/* ===== Navbar Scrolled State ===== */
.navbar-scrolled {
    background-color: rgba(254, 253, 248, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(6, 78, 59, 0.08);
}

/* ===== Scroll Reveal ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 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; }

/* ===== Responsive ===== */
@media (max-width: 767px) {
    .hero-title {
        font-size: 2.75rem;
    }

    .section-title {
        font-size: 2.25rem;
    }

    .about-img-accent {
        display: none;
    }

    .about-badge {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        margin-bottom: 1.5rem;
        display: inline-block;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .hero-title {
        font-size: 3.5rem;
    }
}

@media (min-width: 1024px) {
    .hero-grid {
        transform: translateY(-40px);
    }
}

/* ===== Reduced Motion ===== */
@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;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
