/* ==========================================
   JB Sales & Leasing — Custom Styles
   Classic & Elegant · Midnight Blue + Mint
   ========================================== */

/* Base Reset & Typography */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background: rgba(20, 184, 138, 0.3);
    color: #fff;
}

/* ==========================================
   Navbar
   ========================================== */
#navbar {
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    background: transparent;
    transition: background 0.5s ease, backdrop-filter 0.5s ease, box-shadow 0.5s ease;
}

#navbar.scrolled {
    background: rgba(5, 13, 26, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #5ceec4;
    transition: width 0.3s ease;
}

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

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

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

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

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Menu button active state */
#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

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

#menu-btn.active .menu-line:nth-child(3) {
    width: 1.5rem;
    transform: rotate(-45deg) translate(3px, -3px);
}

/* ==========================================
   Hero Section
   ========================================== */
.hero-orb {
    animation: orbFloat 20s ease-in-out infinite;
}

.orb-1 {
    background: radial-gradient(circle, #14b88a 0%, transparent 70%);
    animation-duration: 25s;
}

.orb-2 {
    background: radial-gradient(circle, #0d966e 0%, transparent 70%);
    animation-duration: 30s;
    animation-direction: reverse;
}

.orb-3 {
    background: radial-gradient(circle, #5ceec4 0%, transparent 70%);
    animation-duration: 20s;
    animation-delay: -5s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(40px, 30px) scale(1.02); }
}

.cta-orb {
    animation: orbFloat 18s ease-in-out infinite;
}

/* ==========================================
   Scroll Reveal Animations
   Progressive enhancement — content is visible by default,
   JS adds the hidden state for animation only.
   ========================================== */
.reveal-up,
.reveal-left,
.reveal-right {
    /* Content is visible by default — no opacity:0 gating */
}

/* Animation classes applied by JS only */
.reveal-animate.reveal-up {
    animation: revealUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.reveal-animate.reveal-left {
    animation: revealLeft 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.reveal-animate.reveal-right {
    animation: revealRight 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes revealUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes revealLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes revealRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Staggered delays for cards */
.reveal-animate .delay-100 { animation-delay: 0.1s; animation-fill-mode: both; }
.reveal-animate .delay-200 { animation-delay: 0.2s; animation-fill-mode: both; }
.reveal-animate .delay-300 { animation-delay: 0.3s; animation-fill-mode: both; }
.reveal-animate .delay-400 { animation-delay: 0.4s; animation-fill-mode: both; }
.reveal-animate .delay-500 { animation-delay: 0.5s; animation-fill-mode: both; }
.reveal-animate .delay-600 { animation-delay: 0.6s; animation-fill-mode: both; }

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal-animate.reveal-up,
    .reveal-animate.reveal-left,
    .reveal-animate.reveal-right {
        animation: none;
        opacity: 1;
    }
    
    .hero-orb,
    .cta-orb {
        animation: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* ==========================================
   Form Styles
   ========================================== */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 1px rgba(92, 236, 196, 0.15);
}

/* ==========================================
   Button Hover Effects
   ========================================== */
button[type="submit"]:hover {
    box-shadow: 0 8px 30px rgba(20, 184, 138, 0.25);
    transform: translateY(-1px);
}

button[type="submit"]:active {
    transform: translateY(0);
}

/* ==========================================
   Smooth Image Loading
   ========================================== */
img {
    image-rendering: auto;
    transition: opacity 0.3s ease;
}

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

::-webkit-scrollbar-track {
    background: #050D1A;
}

::-webkit-scrollbar-thumb {
    background: rgba(92, 236, 196, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(92, 236, 196, 0.4);
}

/* ==========================================
   Responsive Adjustments
   ========================================== */
@media (max-width: 768px) {
    #navbar {
        background: rgba(5, 13, 26, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }
}

/* ==========================================
   Focus Visible for Accessibility
   ========================================== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #5ceec4;
    outline-offset: 2px;
}
