/* ===== 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 {
    background: #1B4332;
    color: #faf9f6;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #f5f3ee;
}
::-webkit-scrollbar-thumb {
    background: #b9d0b9;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #8fb88f;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scrollLine {
    0% {
        opacity: 0;
        transform: scaleY(0);
        transform-origin: top;
    }
    50% {
        opacity: 1;
        transform: scaleY(1);
        transform-origin: top;
    }
    100% {
        opacity: 0;
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

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

/* ===== Scroll Reveal ===== */
.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; }

/* ===== Navbar ===== */
#navbar {
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(250, 249, 246, 0.92);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(27, 67, 50, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #1B4332;
    transition: width 0.3s ease;
}

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

/* ===== Menu Lines Animation ===== */
#menu-btn.active .menu-line:first-child {
    transform: rotate(45deg) translate(3px, 3px);
}

#menu-btn.active .menu-line:last-child {
    transform: rotate(-45deg) translate(3px, -3px);
}

/* ===== Mobile Menu ===== */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* ===== Stat Cards ===== */
.stat-card {
    animation: float 6s ease-in-out infinite;
}

.stat-card:nth-child(2) {
    animation-delay: -2s;
}

.stat-card:nth-child(3) {
    animation-delay: -4s;
}

/* ===== Scroll Line ===== */
.animate-scroll-line {
    animation: scrollLine 2s ease-in-out infinite;
}

/* ===== Listing Cards ===== */
.listing-card {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.listing-card:hover {
    transform: translateY(-4px);
}

/* ===== Service Cards ===== */
.service-card {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s ease,
                border-color 0.4s ease;
}

.service-card:hover {
    transform: translateY(-4px);
}

/* ===== Testimonial Cards ===== */
.testimonial-card {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(27, 67, 50, 0.08);
}

/* ===== Form Select ===== */
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='%238fb88f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .stat-card {
        animation: none;
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        margin-bottom: 1rem;
    }
}

/* ===== Focus visible ===== */
:focus-visible {
    outline: 2px solid #1B4332;
    outline-offset: 2px;
}

/* ===== Print ===== */
@media print {
    #navbar, .animate-scroll-line { display: none; }
    body { background: white; }
}
