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

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

body {
    overflow-x: hidden;
}

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

/* ===== Scroll Reveal Animations ===== */
.reveal-up {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

/* Hidden initial states for scroll-reveal (progressive enhancement) */
.reveal-up.hidden-init,
.reveal-left.hidden-init,
.reveal-right.hidden-init {
    opacity: 0;
    transform: translateY(30px);
}

.reveal-left.hidden-init {
    transform: translateX(-40px);
}

.reveal-right.hidden-init {
    transform: translateX(40px);
}

/* ===== Hero Animations ===== */
.hero-content {
    opacity: 1;
    transform: translateY(0);
    animation: heroFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-content:nth-child(2) { animation-delay: 0.1s; }
.hero-content:nth-child(3) { animation-delay: 0.2s; }
.hero-content:nth-child(4) { animation-delay: 0.3s; }
.hero-content:nth-child(5) { animation-delay: 0.4s; }
.hero-content:nth-child(6) { animation-delay: 0.5s; }

.hero-image {
    opacity: 1;
    transform: translateY(0);
    animation: heroFadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

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

/* Floating card animation */
.floating-card {
    animation: float 4s ease-in-out infinite;
}

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

/* Geometric shape animations */
.hero-shape {
    animation: gentleDrift 8s ease-in-out infinite;
}

.shape-circle-1 { animation-delay: 0s; }
.shape-circle-2 { animation-delay: 2s; }
.shape-rect-1 { animation-delay: 1s; }
.shape-triangle { animation-delay: 3s; }

@keyframes gentleDrift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(8px, -12px) rotate(2deg); }
    50% { transform: translate(-5px, -20px) rotate(-1deg); }
    75% { transform: translate(10px, -8px) rotate(1deg); }
}

/* ===== Navbar ===== */
.nav-scrolled {
    background: rgba(253, 248, 240, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

.nav-scrolled #navbar {
    padding-top: 0;
}

/* ===== Mobile Menu ===== */
.mobile-link {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* ===== Button Hover Effects ===== */
a, button {
    -webkit-tap-highlight-color: transparent;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: #e8522a;
    border-radius: 4px;
}

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

/* ===== Selection ===== */
::selection {
    background: #e8522a;
    color: white;
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal-up, .reveal-left, .reveal-right {
        opacity: 1;
        transform: none;
    }
    
    .floating-card {
        animation: none;
    }
    
    .hero-shape {
        animation: none;
    }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero-content {
        animation-duration: 0.6s;
    }
    
    .hero-image {
        animation-duration: 0.8s;
    }
}
