/* ========================================
   K's Frozen Delights — Custom Styles
   ======================================== */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Base styles */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection color */
::selection {
    background-color: #065F46;
    color: #FDFBF7;
}

/* Navbar transition states */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 1px;
    background-color: #065F46;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

/* Navbar scrolled state */
.navbar-scrolled #navbar {
    background-color: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(6, 95, 70, 0.08);
}

.navbar-scrolled .nav-text {
    color: #065F46;
}

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

#mobile-menu.open .mobile-link {
    animation: fadeUp 0.4s ease forwards;
    opacity: 0;
}

#mobile-menu.open .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { animation-delay: 0.2s; }

/* Mobile menu button animation */
.menu-open .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

.menu-open .menu-line:nth-child(2) {
    opacity: 0;
}

.menu-open .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.25rem;
}

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

.floating-card:nth-child(2) {
    animation-delay: -2s;
    animation-duration: 7s;
}

.floating-card:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 5s;
}

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

/* Fade up animation for scroll reveals */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll reveal base state — always visible by default */
.reveal {
    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);
}

/* Only animate on systems that prefer motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .reveal.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Image hover zoom */
img {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #065F46;
    border-radius: 3px;
}

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

/* Form styles */
input, textarea {
    border: 1px solid #D1FAE5;
    background: #FDFBF7;
    color: #065F46;
    transition: border-color 0.3s ease;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

input::placeholder, textarea::placeholder {
    color: #065F46;
    opacity: 0.4;
}

/* Success message */
.form-success {
    animation: fadeUp 0.5s ease forwards;
}

/* Image aspect ratios */
img {
    vertical-align: middle;
}

/* Print styles */
@media print {
    nav, footer, .floating-card {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}
