/* Custom styles for Mitchell Dasenbrock — Farmers Insurance */

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

/* Scroll reveal base - content always visible by default */
.scroll-reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Only apply hidden state when JS enhances and reduced motion is allowed */
@media (prefers-reduced-motion: no-preference) {
    .js-enabled .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .js-enabled .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar transition */
#navbar.scrolled {
    background: rgba(10, 10, 13, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255,255,255,0.05);
}

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

#navbar.scrolled .nav-subtext {
    color: #ffd5ca;
}

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

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

.menu-line:nth-child(1) {
    transform-origin: center;
}

.menu-line:nth-child(2) {
    transform-origin: center;
}

.menu-line:nth-child(3) {
    transform-origin: center;
}

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

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

#mobile-menu-btn.active .menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
    width: 1.5rem;
    margin-right: 0;
}

/* Mobile nav link animation */
.mobile-nav-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
}

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

/* Selection color */
::selection {
    background: rgba(242, 121, 91, 0.25);
    color: #1f1f24;
}

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

::-webkit-scrollbar-track {
    background: #1f1f24;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #71717a;
}

/* Subtle image hover zoom */
img {
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid #F2795B;
    outline-offset: 2px;
}
