/* ===== 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: #e8d4df;
    color: #4d2c45;
}

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

#navbar.scrolled {
    background: rgba(250, 245, 247, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 20px rgba(77, 44, 69, 0.08);
}

.nav-link {
    position: relative;
}

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

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

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

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

.mobile-link {
    transition: opacity 0.3s ease;
}

/* Hamburger animation */
.hamburger-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menu-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

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

#menu-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    width: 1.5rem;
}

/* ===== FLOATING CARDS ===== */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

.card-1 {
    animation-delay: 0s;
}

.card-2 {
    animation-delay: -2s;
}

.card-3 {
    animation-delay: -4s;
}

.card-4 {
    animation-delay: -1s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-16px); }
}

/* ===== SCROLL REVEAL ===== */
.reveal-up {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* When JS is disabled, all elements stay visible (progressive enhancement) */
/* When JS is enabled, elements below the fold get animated */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up.animated {
        opacity: 0;
        transform: translateY(40px);
    }

    .reveal-left.animated {
        opacity: 0;
        transform: translateX(-40px);
    }

    .reveal-right.animated {
        opacity: 0;
        transform: translateX(40px);
    }
}

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

/* ===== SMOOTH SCROLL OFFSET ===== */
section[id] {
    scroll-margin-top: 80px;
}

/* ===== IMAGE LOADING ===== */
img {
    background-color: #f3eaf0;
}

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