/* === Base & Typography === */
html {
    scroll-behavior: smooth;
}

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

::selection {
    background-color: #9a223e;
    color: #fff8f7;
}

/* === Custom Scrollbar === */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #faf8f6;
}
::-webkit-scrollbar-thumb {
    background: #d4466b;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #9a223e;
}

/* === Hero Text Reveal Animations === */
.reveal-text {
    display: inline-block;
    transform: translateY(100%);
    animation: revealUp 0.9s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.reveal-text:nth-child(1) { animation-delay: 0.1s; }
.reveal-text:nth-child(2) { animation-delay: 0.2s; }
.reveal-text:nth-child(3) { animation-delay: 0.3s; }
.reveal-text:nth-child(4) { animation-delay: 0.4s; }
.reveal-text:nth-child(5) { animation-delay: 0.5s; }

@keyframes revealUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* === Scroll Reveal (progressive enhancement) === */
@media (prefers-reduced-motion: no-preference) {
    .reveal-on-scroll {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.8s cubic-bezier(0.23, 1, 0.32, 1), transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    }
    
    .reveal-on-scroll.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Navbar Scroll State === */
.nav-scrolled {
    background-color: rgba(250, 248, 246, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(42, 37, 34, 0.06);
}

.nav-scrolled .navbar-logo {
    color: #2a2522;
}

/* === Service Card Hover === */
.service-card {
    transition: background-color 0.5s ease;
}

.service-card:hover {
    background-color: #fff8f7;
}

/* === Form Focus States === */
input:focus,
textarea:focus,
select:focus {
    border-bottom-color: #9a223e !important;
}

input:focus + .focus-line,
textarea:focus + .focus-line,
select:focus + .focus-line {
    transform: scaleX(1);
}

/* === Mobile Menu Transitions === */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s 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; }

/* === Hamburger Animation === */
.menu-open #menuLine1 {
    transform: rotate(45deg) translate(3px, 3px);
}
.menu-open #menuLine2 {
    opacity: 0;
}
.menu-open #menuLine3 {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.5rem;
}

/* === Image Hover Zoom === */
.overflow-hidden img {
    transition: transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

/* === Link Underline Animation === */
.underline-hover {
    position: relative;
}

.underline-hover::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #9a223e;
    transition: width 0.3s ease;
}

.underline-hover:hover::after {
    width: 100%;
}

/* === Decorative Line Animation === */
@keyframes drawLine {
    from { width: 0; }
    to { width: 4rem; }
}

.section-divider {
    animation: drawLine 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

/* === Button Ripple Effect === */
button, a[role="button"] {
    position: relative;
    overflow: hidden;
}

/* === Print Styles === */
@media print {
    nav, #contactForm, button {
        display: none;
    }
    body {
        background: white;
        color: black;
    }
}
