/* Base styles and overrides */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #faf5e8; }
::-webkit-scrollbar-thumb { background: #d1442a; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #c23420; }

/* Selection */
::selection { background: #d1442a; color: #fefcf6; }

/* Navbar glass effect */
#navbar.scrolled {
    background: rgba(31, 41, 55, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

/* Smooth focus */
*:focus-visible {
    outline: 2px solid #d1442a;
    outline-offset: 2px;
}

/* Button ripple effect */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* Prevent layout shift on images */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Mobile menu animation */
#mobileMenu.open {
    animation: slideDown 0.3s ease forwards;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile menu button animation */
.menu-btn-active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.menu-btn-active .menu-line:nth-child(2) {
    opacity: 0;
}
.menu-btn-active .menu-line:nth-child(3) {
    width: 20px;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Geometric floating animation */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(3deg); }
}
@keyframes floatReverse {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(12px) rotate(-3deg); }
}
.hero-shape-1 { animation: float 6s ease-in-out infinite; }
.hero-shape-2 { animation: floatReverse 8s ease-in-out infinite; }

/* Card hover glow */
.group:hover .group-hover\\:bg-terra-500 {
    box-shadow: 0 8px 24px rgba(209, 68, 42, 0.3);
}
.group:hover .group-hover\\:bg-sand-500 {
    box-shadow: 0 8px 24px rgba(161, 113, 41, 0.3);
}
