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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdfaf6;
}
::-webkit-scrollbar-thumb {
    background: #b8324a;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #9a2538;
}

/* === NAVBAR === */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(254, 250, 246, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(154, 37, 56, 0.08);
}

.nav-link {
    position: relative;
}

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

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

#navbar.scrolled .nav-link {
    color: #7f2031;
}

#navbar.scrolled .nav-link::after {
    background: #b8324a;
}

/* === MOBILE MENU === */
.mobile-link {
    position: relative;
}

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

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

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

@keyframes spin-slow {
    from { transform: rotate(12deg); }
    to { transform: rotate(372deg); }
}

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

.animate-float-slow { animation: float-slow 8s ease-in-out infinite; }
.animate-float-medium { animation: float-medium 6s ease-in-out infinite; }
.animate-float-fast { animation: float-fast 4s ease-in-out infinite; }
.animate-spin-slow { animation: spin-slow 20s linear infinite; }
.animate-scroll-line { animation: scroll-line 2s ease-in-out infinite; }

/* === SCROLL REVEAL (progressive enhancement) === */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

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

/* Fallback: content is always visible if JS is disabled */
.reveal-up {
    opacity: 1;
    transform: translateY(0);
}

/* === SERVICE CARDS === */
.service-card {
    position: relative;
}

.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

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

/* === GALLERY === */
.gallery-item {
    cursor: pointer;
}

.gallery-item img {
    will-change: transform;
}

/* === BUTTONS === */
a {
    text-decoration: none;
}

button, input, select, textarea {
    font-family: inherit;
}

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

/* === MOBILE MENU TRANSITIONS === */
#mobile-menu {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu.open {
    transform: translateX(0);
}

/* === MISC === */
::selection {
    background: #b8324a;
    color: #fff;
}
