/* ─── Custom Properties ─── */
:root {
    --terracotta-500: #e05220;
    --terracotta-400: #ee6e42;
    --sand-400: #d4b87a;
    --sand-300: #b89452;
    --concrete-900: #1a1715;
    --concrete-800: #2e2a27;
}

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

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

body {
    min-height: 100vh;
}

/* ─── Geometric Background Shapes ─── */
.geo-shape {
    position: absolute;
    pointer-events: none;
    opacity: 0.06;
}

.shape-circle-1 {
    top: 15%;
    left: -5%;
    width: 400px;
    height: 400px;
    border: 3px solid #e05220;
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
}

.shape-circle-2 {
    bottom: 10%;
    right: -3%;
    width: 300px;
    height: 300px;
    border: 3px solid #d4b87a;
    border-radius: 50%;
    animation: float 15s ease-in-out infinite reverse;
}

.shape-square-1 {
    top: 40%;
    right: 5%;
    width: 120px;
    height: 120px;
    border: 3px solid #e05220;
    border-radius: 20px;
    transform: rotate(45deg);
    animation: spin 25s linear infinite;
}

.shape-triangle-1 {
    top: 60%;
    left: 8%;
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 104px solid #d4b87a;
    opacity: 0.04;
    animation: float 18s ease-in-out infinite;
}

.shape-arc-1 {
    top: 80%;
    left: 50%;
    width: 200px;
    height: 200px;
    border: 3px solid #e05220;
    border-radius: 50%;
    border-top-color: transparent;
    border-left-color: transparent;
    transform: translate(-50%, 0) rotate(-45deg);
    animation: spin 30s linear infinite;
}

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

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ─── Navbar ─── */
#navbar {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(247, 247, 246, 0.85);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #e05220;
    transform: translateX(-50%);
    transition: width 0.3s ease;
    border-radius: 1px;
}

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

/* ─── Mobile Menu ─── */
#mobileMenu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-nav-link {
    display: block;
    border-radius: 12px;
}

/* ─── Hero ─── */
#hero {
    position: relative;
}

/* ─── Service Cards ─── */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #e05220, #d4b87a);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
    border-radius: 3px 3px 0 0;
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* ─── Project Cards ─── */
.project-card {
    position: relative;
}

.project-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    border: 2px solid transparent;
    transition: border-color 0.5s ease;
    pointer-events: none;
}

.project-card:hover::after {
    border-color: rgba(224, 82, 32, 0.3);
}

/* ─── Animations ─── */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.fade-in-up.delay-100 { animation-delay: 0.1s; }
.fade-in-up.delay-200 { animation-delay: 0.2s; }
.fade-in-up.delay-300 { animation-delay: 0.3s; }
.fade-in-up.delay-400 { animation-delay: 0.4s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Scroll Reveal ─── */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ─── Form Styling ─── */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(224, 82, 32, 0.15);
}

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

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

::-webkit-scrollbar-thumb {
    background: #dcdada;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #bdbbb8;
}

/* ─── Selection ─── */
::selection {
    background: rgba(224, 82, 32, 0.2);
    color: #1a1715;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .shape-circle-1 {
        width: 200px;
        height: 200px;
    }
    
    .shape-circle-2 {
        width: 150px;
        height: 150px;
    }
    
    .shape-square-1 {
        width: 60px;
        height: 60px;
    }
}

@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;
    }
}
