/* ========== BASE ========== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(130, 24, 53, 0.15);
    color: #6e172f;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #fdf8f5;
}
::-webkit-scrollbar-thumb {
    background: #f5a0b5;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #c02448;
}

/* ========== NAVBAR ========== */
.nav-link {
    position: relative;
}

/* ========== FLOATING CARDS ========== */
.floating-card-1 {
    animation: float1 6s ease-in-out infinite;
}
.floating-card-2 {
    animation: float2 7s ease-in-out infinite;
}
.floating-card-3 {
    animation: float3 5.5s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(0.5deg); }
}
@keyframes float2 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-16px) rotate(-0.5deg); }
}
@keyframes float3 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(0.3deg); }
}

/* ========== SCROLL INDICATOR ========== */
.animate-scroll-indicator {
    animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
    0% { top: -16px; opacity: 0; }
    50% { opacity: 1; }
    100% { top: 48px; opacity: 0; }
}

/* ========== SERVICE CARDS ========== */
.service-card {
    will-change: transform;
}

/* ========== REVEAL ANIMATIONS (progressive enhancement) ========== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
}

/* Fallback: always visible if JS is disabled or prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

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

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

/* ========== MOBILE LINKS ========== */
.mobile-link {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease, transform 0.4s 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; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* ========== NAVBAR SCROLLED STATE ========== */
.nav-scrolled {
    background: rgba(254, 252, 251, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(130, 24, 53, 0.08);
}

.nav-transparent {
    background: transparent !important;
}

.nav-transparent .nav-link {
    color: rgba(253, 208, 216, 0.85) !important;
}

.nav-transparent .nav-link:hover {
    color: #fce7eb !important;
}

.nav-transparent .nav-link::after {
    background: #fce7eb !important;
}

.nav-transparent #navbar a span.font-serif {
    color: #fce7eb !important;
}

/* ========== MOBILE HAMBURGER ========== */
#mobile-menu.open ~ div .nav-transparent #menu-btn span,
.nav-transparent #menu-btn span {
    color: #fce7eb;
}

#menu-btn span {
    color: #6e172f;
}

#mobile-menu.open #line1 {
    transform: rotate(45deg) translate(3px, 3px);
}
#mobile-menu.open #line2 {
    opacity: 0;
}
#mobile-menu.open #line3 {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.5rem;
}

/* ========== IMAGE PLACEHOLDERS ========== */
img {
    max-width: 100%;
    height: auto;
}

/* ========== FOCUS VISIBLE ========== */
*:focus-visible {
    outline: 2px solid #c02448;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ========== UTILITY ========== */
.font-serif {
    font-weight: 400;
}

/* ========== RESPONSIVE TWEAKS ========== */
@media (max-width: 767px) {
    .floating-card-1,
    .floating-card-2,
    .floating-card-3 {
        display: none;
    }
}
