/* Base & Typography */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: #d94a22;
    color: white;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FAF7F2;
}
::-webkit-scrollbar-thumb {
    background: #d9b05a;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #c99744;
}

/* Navbar transition */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(250, 247, 242, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(26, 22, 20, 0.08);
}

#navbar.scrolled #nav-logo-text {
    color: #1a1614;
}

/* Mobile menu */
#mobile-menu.open {
    transform: translateX(0);
}

#mobile-menu.closed {
    transform: translateX(100%);
}

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s 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; }
#mobile-menu.open .mobile-link:nth-child(6) { transition-delay: 0.35s; }

/* Menu icon animation */
#menu-btn.active #bar1 {
    transform: rotate(45deg) translate(4px, 4px);
}
#menu-btn.active #bar2 {
    opacity: 0;
}
#menu-btn.active #bar3 {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Service card hover effect */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #d94a22;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

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

/* Scroll reveal animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .reveal,
    .service-card,
    .service-card::after,
    .mobile-link {
        transition: none;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Hero image subtle float */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Form styles */
.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 14px 16px;
    background: white;
    border: 1px solid rgba(26, 22, 20, 0.15);
    border-radius: 12px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 15px;
    color: #1a1614;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    border-color: #d94a22;
    box-shadow: 0 0 0 3px rgba(217, 74, 34, 0.1);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #6b6560;
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form button[type="submit"] {
    background: #d94a22;
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 100px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.contact-form button[type="submit"]:hover {
    background: #c23718;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(217, 74, 34, 0.25);
}

.contact-form button[type="submit"]:active {
    transform: translateY(0);
}

/* Success message */
.form-success {
    display: none;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 16px 20px;
    color: #166534;
    font-size: 15px;
    margin-top: 16px;
    animation: fadeIn 0.4s ease;
}

.form-success.show {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.1;
    }
}
