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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

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

/* ===== Scroll Reveal Animations ===== */
.reveal-up {
    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-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-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-up.visible,
.reveal-left.visible,
.reveal-right.visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* Staggered delays */
.reveal-up:nth-child(1) { transition-delay: 0.05s; }
.reveal-up:nth-child(2) { transition-delay: 0.15s; }
.reveal-up:nth-child(3) { transition-delay: 0.25s; }
.reveal-up:nth-child(4) { transition-delay: 0.35s; }

/* ===== Hero Animations ===== */
.hero-title {
    animation: heroFadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.hero-subtitle {
    animation: heroFadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

.hero-buttons {
    animation: heroFadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both;
}

.hero-scroll {
    animation: heroFadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.8s both;
}

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

/* Hero decorative shapes */
.hero-shape {
    animation: float 8s ease-in-out infinite;
}

.shape-1 { animation-delay: 0s; }
.shape-2 { animation-delay: -2s; }
.shape-3 { animation-delay: -4s; }
.shape-4 { animation-delay: -6s; }

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.03); }
}

/* Particles */
.particle {
    position: absolute;
    width: 8px;
    height: 8px;
    opacity: 0.4;
}

.particle span {
    display: block;
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 50%;
    animation: particleFloat 6s ease-in-out infinite;
}

.p1 { top: 20%; left: 10%; animation-delay: 0s; }
.p2 { top: 40%; right: 15%; animation-delay: -1.5s; }
.p3 { bottom: 30%; left: 20%; animation-delay: -3s; }
.p4 { top: 60%; right: 25%; animation-delay: -4.5s; }
.p5 { bottom: 20%; right: 10%; animation-delay: -2s; }

@keyframes particleFloat {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0.4; }
    25% { transform: translateY(-30px) translateX(10px); opacity: 0.6; }
    50% { transform: translateY(-15px) translateX(-10px); opacity: 0.3; }
    75% { transform: translateY(-40px) translateX(5px); opacity: 0.5; }
}

/* Scroll dot animation */
.scroll-dot {
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(8px); opacity: 0.4; }
}

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

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(123, 45, 59, 0.08);
}

#navbar.scrolled .nav-link {
    color: #4b5563;
}

#navbar.scrolled .menu-line {
    background: #7B2D3B;
}

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

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

#mobile-menu.open .mobile-link {
    animation: mobileLinkFade 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

#mobile-menu.open .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { animation-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(5) { animation-delay: 0.25s; }
#mobile-menu.open .mobile-link:nth-child(6) { animation-delay: 0.3s; }
#mobile-menu.open .mobile-link:nth-child(7) { animation-delay: 0.35s; }

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

/* Hamburger animation */
.menu-line.active-1 {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-line.active-2 {
    opacity: 0;
}

.menu-line.active-3 {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Service Cards ===== */
.service-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover {
    transform: translateY(-6px);
}

/* ===== FAQ ===== */
.faq-item {
    border: 1px solid transparent;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.faq-item:hover {
    border-color: #f9dfe5;
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-content.open {
    max-height: 300px;
}

.faq-icon {
    flex-shrink: 0;
}

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

/* ===== Accessibility ===== */
@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; }
}

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

@media (min-width: 641px) and (max-width: 1024px) {
    .lg\:sticky {
        position: sticky;
    }
}
