@font-face {
    font-family: 'Jonfitti';
    src: url('../file/jonfiti/jonfitti-regular-webfont.woff2') format('woff2'),
        url('../file/jonfiti/jonfitti-regular-webfont.woff') format('woff'),
        url('../file/Jonfitti-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Haas';
    src: url('../file/haas.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}


.jonfitti-font {
    font-family: 'Jonfitti', 'Arial Black', 'Impact', 'Franklin Gothic Bold', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

*,
html,
body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Prevent iOS bounce/pull behavior */
body {
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
    position: relative;

}

/* Dark mode styles with smooth transitions */
body {
    transition: background-color 0.3s ease-in-out;
}

main, footer, section, .preview {
    transition: filter 0.3s ease-in-out;
}

/* Dark mode styles */
body.dark-mode {
    background-color: #121212 !important;
    color: #ffffff;
}

html.dark-mode {
    background-color: #121212 !important;
}

/* Ensure full coverage on mobile devices */
html.dark-mode,
html.dark-mode body {
    background: #121212 !important;
    min-height: 100vh !important;
}

/* Aggressive dark mode coverage for mobile */
html.dark-mode::before {
    content: '';
    position: fixed;
    top: -100px;
    left: 0;
    right: 0;
    height: 100px;
    background: #121212;
    z-index: -1;
}

/* Fix iOS Safari viewport issues */
@supports (-webkit-touch-callout: none) {
    html.dark-mode {
        background: #121212 !important;
        min-height: -webkit-fill-available !important;
        padding-top: env(safe-area-inset-top);
    }

    html.dark-mode body {
        background: #121212 !important;
        min-height: -webkit-fill-available !important;
    }
}

body.dark-mode main,
body.dark-mode footer {
    filter: invert(1);
    transition: filter 0.3s ease;
}

/* Keep preview items (videos/images) in original state in dark mode */
body.dark-mode .preview {
    filter: invert(1) !important;
    transition: filter 0.3s ease !important;
}

/* Fix font test area text visibility in dark mode */
body.dark-mode #font-test {
    color: #1a1a1a !important;
    background-color: #f9fafb !important;
}

body.dark-mode label[for="font-test"] {
    color: #374151 !important;
}

body.dark-mode label[for="font-test"] p {
    color: #6b7280 !important;
}

/* Dark mode nav styles */
body.dark-mode nav {
    background-color: rgba(18, 18, 18, 0.9) !important;
    backdrop-filter: blur(8px);
}

body.dark-mode nav a {
    color: #e5e5e5;
}

body.dark-mode nav a:hover {
    color: #ffffff;
}

body.dark-mode #sun-icon,
body.dark-mode #moon-icon {
    color: #e5e5e5;
}

/* Dark mode toggle hover effects */
/* Moon hover effect - black background, white moon when hovered (moon shows in light mode) */
body:not(.dark-mode) #dark-mode-toggle:hover {
    background-color: black !important;
}

body:not(.dark-mode) #dark-mode-toggle:hover #moon-icon {
    color: white;
}

/* Sun hover effect - turn black when hovered (sun shows in dark mode) */
body.dark-mode #dark-mode-toggle:hover #sun-icon {
    color: black;
}

/* Mobile menu styles */
#mobile-menu-btn {
    position: relative;
    color: #374151 !important; /* Dark gray in light mode */
}

#mobile-menu-btn:hover {
    color: #000000 !important; /* Black on hover in light mode */
}

/* Dark mode mobile menu button */
body.dark-mode #mobile-menu-btn {
    color: #ffffff !important; /* White in dark mode */
}

body.dark-mode #mobile-menu-btn:hover {
    color: rgba(255, 255, 255, 0.8) !important; /* Slightly transparent white on hover */
}

/* Ensure X icon is properly aligned with hamburger */
#mobile-menu-btn svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Mobile menu fade animation */
#mobile-menu {
    transition: opacity 0.3s ease, transform 0.3s ease, max-height 0.3s ease;
    opacity: 1;
    transform: translateY(0) scale(1);
    max-height: 500px;
    overflow: hidden;
    transform-origin: top center;
}

#mobile-menu.menu-hidden {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
    pointer-events: none;
    max-height: 0;
    padding-bottom: 0;
}

/* Mobile menu links smooth transitions */
#mobile-menu a {
    transition: color 0.2s ease, transform 0.2s ease;
}

#mobile-menu a:hover {
    transform: translateX(4px);
}

/* Mobile dark mode toggle styles */
body.dark-mode #mobile-dark-mode-toggle {
    color: #e5e5e5;
}

body.dark-mode #mobile-dark-mode-toggle:hover {
    color: #ffffff;
}

/* Sun hover effect - white background for sun in dark mode */
body.dark-mode #dark-mode-toggle:hover {
    background-color: white !important;
}

/* Invert only the logo in the header */
body.dark-mode nav .logo {
    filter: invert(1);
}

/* Prevent horizontal scroll on mobile */
html,
body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Smooth transitions for dark mode */
main,
footer {
    transition: filter 0.3s ease;
}

/* Smooth underline hover effect for links */
.hover-underline {
    position: relative;
    text-decoration: none;
    transition: color 0.3s ease;
}

.hover-underline::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: currentColor;
    transition: width 0.3s ease;
}

.hover-underline:hover::before {
    width: 100%;
}

/* Special variant for bordered links */
.hover-underline-border {
    position: relative;
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    transition: all 0.3s ease;
}

.hover-underline-border::before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: currentColor;
    transition: width 0.3s ease;
}

.hover-underline-border:hover {
    border-bottom-color: transparent;
}

.hover-underline-border:hover::before {
    width: 100%;
}

animate__animated {
    will-change: transform, opacity;

}


/* Parallax effect styles */
.parallax-wrap {
    position: absolute;
    top: 40%;
    right: 15%;
    width: 180px;
    height: 180px;
    transform: translate(50%, -50%);
    animation: rotate 18s linear infinite;
}

.parallax-wrap span {
    position: absolute;
    height: 15px;
    width: 15px;
    border-radius: 100%;
    opacity: 0.4;
    pointer-events: none;
    transition: transform 0.1s ease-out;
}

@keyframes rotate {
    from {
        transform: translate(50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(50%, -50%) rotate(360deg);
    }
}

.parallax-wrap span:nth-child(1) {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: #3b82f6;
    z-index: 1;
}

.parallax-wrap span:nth-child(2) {
    top: 25%;
    right: 0;
    background: #eab308;
    z-index: 1;
}

.parallax-wrap span:nth-child(3) {
    bottom: 25%;
    right: 0;
    background: #22c55e;
    z-index: 1;
}

.parallax-wrap span:nth-child(4) {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: #ef4444;
    z-index: 1;
}

.parallax-wrap span:nth-child(5) {
    bottom: 25%;
    left: 0;
    background: #8b5cf6;
    z-index: 1;
}

.parallax-wrap span:nth-child(6) {
    top: 25%;
    left: 0;
    background: #f97316;
    z-index: 1;
}

/* Scroll reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.reveal-delay-1 {
    transition-delay: 0.1s;
}

.reveal-delay-2 {
    transition-delay: 0.2s;
}

.reveal-delay-3 {
    transition-delay: 0.3s;
}




.logo {
    position: relative;
    transform: translateX(-1.125rem);
}


/* Logo hover effect */
.logo-container {
    position: relative;
    display: inline-block;
}

.logo-main,
.logo-hover {
    transition: opacity 0.3s ease;
    display: block;
}

.logo-hover {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.logo-container:hover .logo-main {
    opacity: 0;
}

.logo-container:hover .logo-hover {
    opacity: 1;
}

/* Image Modal Styles */
#image-modal {
    backdrop-filter: blur(4px);
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

#image-modal.hidden {
    display: none !important;
}

#image-modal .relative {
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#image-modal img {
    border-radius: 8px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
    max-width: 100%;
    max-height: 100vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

#image-modal:not(.hidden) img {
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

#modal-close {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    padding: 0.5rem;
    backdrop-filter: blur(4px);
}

#modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Make Veggie Delights images clickable */
#vd-container img {
    cursor: pointer;
    transition: transform 0.2s ease;
}

#vd-container img:hover {
    transform: scale(1.02);
}