/* ── Custom Styles for Dip King Hydrographics ── */

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

/* Selection color */
::selection {
    background: color-mix(in srgb, #166534 80%, transparent);
    color: #fff;
}

/* ── Floating Animation for Hero Cards ── */
@keyframes float-slow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}
@keyframes float-medium {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
}
@keyframes float-fast {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

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

/* ── Reveal Animations (progressive enhancement) ── */
/* Default: visible (no JS required) */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* When JS is enabled and prefers-reduced-motion is off,
   set initial hidden state via JS — this file provides the transition */

/* ── Navigation active state ── */
.nav-link.active {
    color: #166534;
    background: color-mix(in srgb, #166534 8%, transparent);
}

/* ── FAQ transitions ── */
.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}
.faq-content.open {
    max-height: 300px;
}

/* ── Mobile menu animation ── */
#mobileMenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.2s ease;
    opacity: 0;
}
#mobileMenu.open {
    max-height: 400px;
    opacity: 1;
}

/* ── Button ripple on focus ── */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #166534;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* ── Input autofill styling ── */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #fff inset !important;
    box-shadow: 0 0 0 30px #fff inset !important;
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f9f3;
}
::-webkit-scrollbar-thumb {
    background: #8fd195;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #5fb96c;
}

/* ── 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;
    }
    .animate-float-slow,
    .animate-float-medium,
    .animate-float-fast {
        animation: none;
    }
}

/* ── Tablet and up ── */
@media (min-width: 768px) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal.delay-100 { transition-delay: 0.1s; }
    .reveal.delay-200 { transition-delay: 0.2s; }
    .reveal.delay-300 { transition-delay: 0.3s; }
}
