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

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

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

/* Selection */
::selection {
    background-color: rgba(232, 106, 91, 0.3);
    color: #f6f6f7;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1e2027;
}
::-webkit-scrollbar-thumb {
    background: #474b58;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #5c6170;
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal[data-reveal-state="hidden"] {
    opacity: 0;
    transform: translateY(30px);
}

/* Staggered children */
.reveal-stagger > * {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-stagger[data-reveal-state="hidden"] > * {
    opacity: 0;
    transform: translateY(20px);
}

.reveal-stagger[data-reveal-state="hidden"] > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger[data-reveal-state="hidden"] > *:nth-child(2) { transition-delay: 0.08s; }
.reveal-stagger[data-reveal-state="hidden"] > *:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger[data-reveal-state="hidden"] > *:nth-child(4) { transition-delay: 0.24s; }
.reveal-stagger[data-reveal-state="hidden"] > *:nth-child(5) { transition-delay: 0.32s; }
.reveal-stagger[data-reveal-state="hidden"] > *:nth-child(6) { transition-delay: 0.40s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal-stagger,
    .reveal-stagger > * {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    html {
        scroll-behavior: auto;
    }
}

/* Navbar transitions */
.nav-scrolled {
    background: rgba(17, 19, 23, 0.92) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(92, 97, 112, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Button focus */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #e86a5b;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Image loading placeholder */
img {
    background-color: #2a2d35;
}

/* Mobile menu animation */
#mobileMenu {
    animation: slideDown 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth section transitions */
section {
    position: relative;
}

/* Form styles */
input, textarea {
    font-family: inherit;
}

input:focus, textarea:focus {
    outline: none;
}

/* Gallery hover overlay */
.group:hover .group-hover\\:scale-110 {
    transform: scale(1.1);
}

/* Floating card animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.floating {
    animation: float 4s ease-in-out infinite;
}

/* Pulse dot */
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.animate-pulse {
    animation: pulse-dot 2s ease-in-out infinite;
}
