/* ─── Custom styles for Just For Hym ─── */

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

/* Prevent FOUC on navbar */
#navbar {
    will-change: background-color, box-shadow;
}

/* ─── Navbar scroll state ─── */
#navbar.scrolled {
    background-color: rgba(11, 31, 87, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

/* ─── Hero animated blobs ─── */
@keyframes float-slow {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

@keyframes float-medium {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-25px, 20px) scale(1.03); }
    66% { transform: translate(15px, -15px) scale(0.97); }
}

@keyframes float-fast {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -25px) scale(1.06); }
}

.hero-blob {
    animation-duration: 20s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
}

.blob-1 { animation-name: float-slow; }
.blob-2 { animation-name: float-medium; animation-duration: 16s; }
.blob-3 { animation-name: float-fast; animation-duration: 12s; }

/* ─── Scroll reveal (progressive enhancement) ─── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

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

    /* Staggered card reveals */
    .reveal.card {
        transition-delay: calc(var(--card-index, 0) * 0.08s);
    }
}

/* Fallback: always visible if JS disabled or reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ─── Mobile menu animations ─── */
#mobile-menu.open {
    animation: slideDown 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hamburger animation */
.menu-line {
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
}

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

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

#menu-btn.active .menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* ─── Mobile link hover ─── */
.mobile-link {
    display: block;
}

/* ─── Card hover glow ─── */
.reveal.card:hover {
    box-shadow: 0 20px 60px -15px rgba(39, 181, 113, 0.15);
}

/* ─── Gallery image hover ─── */
.rounded-2xl.overflow-hidden.group img {
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ─── Button focus states ─── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #27b571;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #4dce91;
}

/* ─── Selection color ─── */
::selection {
    background-color: rgba(39, 181, 113, 0.25);
    color: #113194;
}

/* ─── Form focus transitions ─── */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(39, 181, 113, 0.15);
}

/* ─── Responsive tweaks ─── */
@media (max-width: 640px) {
    .font-display {
        line-height: 1.15;
    }
}
