/* ===== Donut Bliss — Custom Styles ===== */

/* Base */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* ===== Scroll Reveal ===== */
.reveal-up {
    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-up.revealed {
    opacity: 1;
    transform: translateY(0);
}

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

/* ===== Navbar ===== */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background: rgba(255, 248, 245, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

.nav-logo-text {
    transition: color 0.4s ease;
}

#navbar:not(.scrolled) .nav-logo-text {
    color: #ffffff;
}

#navbar.scrolled .nav-logo-text {
    color: #262626;
}

.nav-link {
    position: relative;
}

#navbar:not(.scrolled) .nav-link {
    color: rgba(255, 255, 255, 0.85);
}

#navbar:not(.scrolled) .nav-link:hover {
    color: #ff7f70;
}

#navbar.scrolled .nav-link {
    color: #4a4a4a;
}

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

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

/* ===== Floating Animations ===== */
@keyframes float-slow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes float-medium {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(-3deg); }
}

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

.animate-float-slow {
    animation: float-slow 6s ease-in-out infinite;
}

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

.animate-float-fast {
    animation: float-fast 3s ease-in-out infinite;
}

/* ===== Hero Reveal ===== */
@keyframes heroReveal {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Staggered hero animations */
#hero .reveal-up:nth-child(1) {
    animation: heroReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

#hero .reveal-up:nth-child(2) {
    animation: heroReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.25s both;
}

#hero .reveal-up:nth-child(3) {
    animation: heroReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both;
}

#hero .reveal-up:nth-child(4) {
    animation: heroReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.55s both;
}

#hero .reveal-up:nth-child(5) {
    animation: heroReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.7s both;
}

/* ===== Mobile Menu ===== */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
    opacity: 0;
}

#mobile-menu.open {
    max-height: 500px;
    opacity: 1;
}

.mobile-menu-link {
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.mobile-menu-link:last-child {
    border-bottom: none;
}

/* ===== Form Focus States ===== */
input:focus,
textarea:focus {
    border-color: #ff7f70 !important;
    box-shadow: 0 0 0 4px rgba(255, 90, 90, 0.1) !important;
}

/* ===== Smooth Scroll Offset for Fixed Nav ===== */
section[id] {
    scroll-margin-top: 80px;
}

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

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

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

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

/* ===== Selection ===== */
::selection {
    background: #ffcaa5;
    color: #1a1a1a;
}

/* ===== Image Placeholder Fallback ===== */
img {
    background: linear-gradient(135deg, #ffe4e2 0%, #ffcdd5 100%);
}

/* ===== Print Styles ===== */
@media print {
    #navbar,
    #mobile-menu-btn,
    .animate-float-slow,
    .animate-float-medium,
    .animate-float-fast {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
