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

body {
    overflow-x: hidden;
}

::selection {
    background: #7B2D3B;
    color: #FDF8F6;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FDF8F6;
}
::-webkit-scrollbar-thumb {
    background: #d4a0aa;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7B2D3B;
}

/* ===== Navbar ===== */
.nav {
    background: transparent;
    border-bottom: 1px solid transparent;
}

.nav.scrolled {
    background: rgba(253, 248, 246, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom-color: rgba(123, 45, 59, 0.08);
    box-shadow: 0 1px 20px rgba(123, 45, 59, 0.06);
}

.nav-link {
    position: relative;
}

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

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

/* ===== Mobile Menu ===== */
.mobile-link {
    opacity: 1;
}

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

.menu-line {
    display: block;
}

.menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}
.menu-toggle.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: 3px;
    background: linear-gradient(90deg, #7B2D3B, #d43f6b);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

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

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

.floating {
    animation: float 4s ease-in-out infinite;
}

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

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

/* Only enable animations if user prefers them */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }

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

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

/* ===== Hero Image Subtle Animation ===== */
@keyframes gentle-pulse {
    0%, 100% { box-shadow: 0 25px 50px -12px rgba(123, 45, 59, 0.15); }
    50% { box-shadow: 0 25px 60px -12px rgba(123, 45, 59, 0.25); }
}

#hero .rounded-3xl {
    animation: gentle-pulse 4s ease-in-out infinite;
}

/* ===== Form Focus States ===== */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* ===== Button Hover Lift ===== */
a[href="#contact"],
button[type="submit"] {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

a[href="#contact"]:hover,
button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(123, 45, 59, 0.2);
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 767px) {
    .nav {
        background: rgba(253, 248, 246, 0.98);
        backdrop-filter: blur(12px);
    }

    #hero {
        min-height: auto;
        padding-top: 8rem;
        padding-bottom: 4rem;
    }

    #hero .grid {
        flex-direction: column;
    }

    #hero .order-1 {
        order: 2;
    }

    #hero .order-2 {
        order: 1;
    }

    #hero h1 {
        font-size: 3rem;
    }

    .service-card {
        padding: 2rem !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    #hero h1 {
        font-size: 4rem;
    }
}

/* ===== Print Styles ===== */
@media print {
    .nav,
    #hero .floating,
    section:not(#hero) {
        page-break-inside: avoid;
    }

    body {
        color: #1a1a1a;
        background: white;
    }
}
