/* ===== Base & Utilities ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #0a0f0d;
    color: #f5f0e8;
    font-family: 'Montserrat', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

::selection {
    background: rgba(212, 160, 23, 0.3);
    color: #f5f0e8;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a0f0d;
}
::-webkit-scrollbar-thumb {
    background: #1e2e25;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #059669;
}

/* ===== Animations ===== */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

@keyframes scroll-line {
    0% { top: -100%; }
    100% { top: 100%; }
}

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== Floating Cards ===== */
.floating-card {
    animation: float 4s ease-in-out infinite;
}

.floating-card:nth-child(2) {
    animation-delay: -1s;
    animation-duration: 5s;
}

.floating-card:nth-child(3) {
    animation-delay: -2s;
    animation-duration: 4.5s;
}

.floating-card:nth-child(4) {
    animation-delay: -0.5s;
    animation-duration: 5.5s;
}

.animate-scroll-line {
    animation: scroll-line 2s linear infinite;
}

/* ===== Scroll Reveal ===== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* Stagger delays */
.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; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ===== Navbar ===== */
.navbar-scrolled {
    background: rgba(10, 15, 13, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(30, 46, 37, 0.5);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.navbar-scrolled .nav-link {
    color: rgba(245, 240, 232, 0.8) !important;
}

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

.menu-line {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

#menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

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

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #059669, #d4a017, transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.service-card:hover::before {
    opacity: 1;
}

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

.gallery-item img {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== Button Hover Glow ===== */
.btn-glow:hover {
    box-shadow: 0 0 40px rgba(212, 160, 23, 0.4);
}

/* ===== Input Focus ===== */
input:focus,
select:focus,
textarea:focus {
    border-color: rgba(212, 160, 23, 0.5) !important;
    box-shadow: 0 0 0 1px rgba(212, 160, 23, 0.2) !important;
}

/* ===== Back to Top ===== */
#back-to-top.visible {
    opacity: 1;
    pointer-events: all;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .floating-card {
        display: none;
    }
}

/* ===== 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, .reveal-left, .reveal-right, .reveal-scale {
        opacity: 1;
        transform: none;
    }
}
