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

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

body {
    margin: 0;
    overflow-x: hidden;
}

::selection {
    background: rgba(255, 107, 107, 0.2);
    color: #212529;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f8f9fa;
}

::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

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

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

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

.nav-link::after {
    left: 50%;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
}

/* Mobile menu */
.mobile-nav-link {
    position: relative;
}

/* Hero animations */
@keyframes float {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-20px) scale(1.02); }
}

.hero-deco {
    animation: float 8s ease-in-out infinite;
}

.hero-deco-1 {
    animation-delay: 0s;
}

.hero-deco-2 {
    animation-delay: -2s;
    animation-duration: 10s;
}

.hero-deco-3 {
    animation-delay: -4s;
    animation-duration: 6s;
}

.hero-deco-4 {
    animation-delay: -1s;
    animation-duration: 7s;
}

/* Hero content entrance */
.hero-content {
    opacity: 0;
    transform: translateY(30px);
    animation: heroEntrance 1s ease forwards;
    animation-delay: 0.3s;
}

@keyframes heroEntrance {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll indicator */
.scroll-indicator {
    cursor: pointer;
}

@keyframes scrollLine {
    0% { transform: translateY(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(100%); opacity: 0; }
}

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

/* Scroll reveal animations */
.reveal-on-scroll {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-on-scroll {
        opacity: 0;
        transform: translateY(40px);
    }
    
    .reveal-on-scroll.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered reveal delays */
.reveal-on-scroll:nth-child(1) { transition-delay: 0.1s; }
.reveal-on-scroll:nth-child(2) { transition-delay: 0.2s; }
.reveal-on-scroll:nth-child(3) { transition-delay: 0.3s; }
.reveal-on-scroll:nth-child(4) { transition-delay: 0.4s; }
.reveal-on-scroll:nth-child(5) { transition-delay: 0.5s; }
.reveal-on-scroll:nth-child(6) { transition-delay: 0.6s; }

/* Menu card hover */
.group:hover img {
    transform: scale(1.05);
}

/* Form focus styles */
input:focus,
textarea:focus {
    outline: none;
}

/* Smooth image loading */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.5s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Mobile menu transitions */
#mobile-menu {
    transition: opacity 0.4s ease, pointer-events 0.4s ease;
}

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

/* Mobile menu links animation */
.mobile-nav-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

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

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

/* Menu line animation */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}

#mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

#mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#mobile-menu-btn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Button ripple effect */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid #FF6B6B;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    nav, #contact-form, .scroll-indicator {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
