/* Base Styles */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

/* Geometric Background Decorations */
.geo-shape {
    position: absolute;
    pointer-events: none;
}

.geo-circle-1 {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(123, 36, 25, 0.06) 0%, transparent 70%);
    top: 20%;
    right: -50px;
}

.geo-triangle-1 {
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 100px solid rgba(123, 36, 25, 0.04);
    top: 40%;
    left: 5%;
    transform: rotate(15deg);
}

.geo-square-1 {
    width: 80px;
    height: 80px;
    background: rgba(244, 194, 194, 0.15);
    top: 60%;
    right: 10%;
    transform: rotate(45deg);
    border-radius: 8px;
}

.geo-circle-2 {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 154, 92, 0.08) 0%, transparent 70%);
    bottom: 10%;
    left: 15%;
}

.geo-dots {
    width: 120px;
    height: 120px;
    background-image: radial-gradient(circle, rgba(123, 36, 25, 0.08) 1.5px, transparent 1.5px);
    background-size: 16px 16px;
    top: 75%;
    right: 25%;
    border-radius: 50%;
}

/* Hero Geometric Shapes */
.hero-geo {
    position: absolute;
    pointer-events: none;
}

.hero-geo-1 {
    width: 400px;
    height: 400px;
    border: 2px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    top: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.hero-geo-2 {
    width: 200px;
    height: 200px;
    background: rgba(244, 194, 194, 0.08);
    top: 20%;
    left: -50px;
    border-radius: 30px;
    transform: rotate(30deg);
    animation: float 6s ease-in-out 1s infinite;
}

.hero-geo-3 {
    width: 0;
    height: 0;
    border-left: 80px solid transparent;
    border-right: 80px solid transparent;
    border-bottom: 140px solid rgba(255, 154, 92, 0.06);
    bottom: 20%;
    right: 10%;
    transform: rotate(-15deg);
    animation: float 7s ease-in-out 2s infinite;
}

.hero-geo-4 {
    width: 100px;
    height: 100px;
    border: 2px solid rgba(255, 255, 255, 0.06);
    bottom: 15%;
    left: 15%;
    transform: rotate(45deg);
    animation: float 5s ease-in-out 0.5s infinite;
}

.hero-geo-5 {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    top: 40%;
    right: 30%;
    animation: float 9s ease-in-out 3s infinite;
}

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

#navbar.scrolled {
    background: rgba(255, 251, 248, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(123, 36, 25, 0.08);
}

.nav-link {
    position: relative;
}

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

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

#navbar.scrolled .nav-link {
    color: #7B2419;
}

#navbar.scrolled .nav-link::after {
    background: #7B2419;
}

/* Mobile Menu */
.mobile-nav-link {
    position: relative;
    padding-left: 0;
    transition: padding-left 0.3s ease, color 0.3s ease;
}

.mobile-nav-link:hover {
    padding-left: 12px;
    color: #7B2419;
}

.mobile-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background: #7B2419;
    transition: width 0.3s ease;
}

.mobile-nav-link:hover::before {
    width: 6px;
}

/* Service Cards */
.service-card {
    opacity: 1;
}

/* Project Cards */
.project-card {
    opacity: 1;
}

/* Scroll Reveal */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Back to Top */
.back-to-top {
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

/* Testimonial Cards */
.testimonial-card {
    opacity: 1;
}

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

@keyframes float-delayed {
    0%, 100% { transform: translateY(0px) rotate(5deg); }
    50% { transform: translateY(-15px) rotate(-2deg); }
}

/* Selection */
::selection {
    background: rgba(123, 36, 25, 0.15);
    color: #4a1410;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #FFFBF8;
}

::-webkit-scrollbar-thumb {
    background: #F4C2C2;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #7B2419;
}

/* Focus styles */
:focus-visible {
    outline: 2px solid #7B2419;
    outline-offset: 2px;
}

/* 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;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-geo-1 {
        width: 200px;
        height: 200px;
    }
    
    .hero-geo-2 {
        width: 100px;
        height: 100px;
    }
    
    .hero-geo-3 {
        display: none;
    }
    
    .hero-geo-4,
    .hero-geo-5 {
        display: none;
    }
}

/* Form select dropdown arrow override for better cross-browser */
select {
    background-image: url('data:image/svg+xml;charset=UTF-8,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2220%22 height=%2220%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%237B2419%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpolyline points=%226 9 12 15 18 9%22%3E%3C/polyline%3E%3C/svg%3E') !important;
}
