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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(181, 45, 69, 0.15);
    color: #641b27;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf0f2;
}
::-webkit-scrollbar-thumb {
    background: #d44560;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #b52d45;
}

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

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

@keyframes scroll-line {
    0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
    51% { transform-origin: bottom; }
    100% { opacity: 0; transform: scaleY(0); transform-origin: bottom; }
}

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

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 7s ease-in-out infinite;
    animation-delay: 1s;
}

.animate-scroll-line {
    animation: scroll-line 2s ease-in-out infinite;
}

/* ===== Hero Animations ===== */
.hero-content {
    animation: fadeInLeft 1s ease-out forwards;
}

.hero-images {
    animation: fadeInRight 1s ease-out 0.3s forwards;
    opacity: 0;
}

/* ===== Service Cards ===== */
.service-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out, background 0.5s ease, box-shadow 0.5s ease;
}

.service-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Gallery Items ===== */
.gallery-item {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.gallery-item.visible {
    opacity: 1;
    transform: scale(1);
}

/* ===== Testimonial Cards ===== */
.testimonial-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out, background 0.5s ease;
}

.testimonial-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== About Content ===== */
.about-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.about-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.about-images {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.about-images.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ===== Section Headers ===== */
.service-reveal,
.gallery-reveal,
.testimonial-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.service-reveal.visible,
.gallery-reveal.visible,
.testimonial-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Contact ===== */
.contact-info {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.contact-info.visible {
    opacity: 1;
    transform: translateY(0);
}

.contact-form-container {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease-out 0.2s, transform 0.7s ease-out 0.2s;
}

.contact-form-container.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Navbar ===== */
#navbar.scrolled {
    background: rgba(254, 252, 246, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(181, 45, 69, 0.08);
}

/* ===== Mobile Menu ===== */
#mobileMenu.open {
    transform: translateX(0);
}

/* ===== Hamburger Animation ===== */
#menuBtn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#menuBtn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

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

/* ===== Mobile Links ===== */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* ===== Button Ripple Effect ===== */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* ===== 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; }
    .service-card, .gallery-item, .testimonial-card,
    .about-reveal, .about-images, .service-reveal,
    .gallery-reveal, .testimonial-reveal, .contact-info,
    .contact-form-container, .hero-content, .hero-images {
        opacity: 1;
        transform: none;
    }
}

/* ===== Focus Styles ===== */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid #d44560;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
    .hero-images {
        margin-top: 2rem;
    }
}
