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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FDF8F9;
}
::-webkit-scrollbar-thumb {
    background: #6B0F1A;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #4A0A12;
}

/* Navbar */
#navbar {
    background: transparent;
    transition: background-color 0.5s ease, box-shadow 0.5s ease;
}

#navbar.scrolled {
    background: rgba(107, 15, 26, 0.97);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

#nav-logo {
    opacity: 0;
    transition: opacity 0.8s ease 0.3s;
}

#navbar.scrolled #nav-logo {
    opacity: 1;
}

.nav-link {
    position: relative;
}

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

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

/* Mobile Menu */
#mobile-menu {
    z-index: 50;
}

.mobile-menu-link {
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

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

#mobile-menu.open .mobile-menu-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-menu-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-menu-link:nth-child(4) { transition-delay: 0.3s; }
#mobile-menu.open .mobile-menu-link:nth-child(5) { transition-delay: 0.4s; }

/* Hero Animations */
.hero-subtitle {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.5s;
    opacity: 0;
}

.hero-title {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.8s;
    opacity: 0;
}

.hero-desc {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 1.1s;
    opacity: 0;
}

.hero-cta {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 1.4s;
    opacity: 0;
}

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

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-submit {
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.btn-primary::before,
.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    transition: left 0.4s ease;
    z-index: -1;
}

.btn-primary::before {
    background: #fff;
}

.btn-primary:hover::before {
    left: 0;
}

.btn-secondary::before {
    background: #F9D5E6;
}

.btn-secondary:hover::before {
    left: 0;
}

/* Form Styles */
input:focus,
textarea:focus {
    border-color: #6B0F1A !important;
}

input:focus,
textarea:focus {
    box-shadow: 0 2px 0 0 #6B0F1A;
}

/* Image Hover Effects */
.group img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Selection color */
::selection {
    background: #F9D5E6;
    color: #4A0A12;
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Large screen adjustments */
@media (min-width: 1920px) {
    html {
        font-size: 18px;
    }
}
