/* ============================================
   Sam Garrard — RE/MAX Revolution
   Custom styles & animations
   ============================================ */

/* --- Clip path for hero --- */
.clip-hero-right {
    clip-path: polygon(30% 0, 100% 0, 100% 100%, 0% 100%);
}

/* --- Scroll reveal base (progressive enhancement) --- */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    .scroll-reveal.is-visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Navbar scroll state --- */
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

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

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* --- Selection color --- */
::selection {
    background: #0d9488;
    color: white;
}

/* --- Custom scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* --- Mobile menu transitions --- */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
}

#mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}

/* --- Hamburger animation --- */
.menu-line {
    transition: all 0.3s ease;
}

#menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menu-toggle.active .menu-line:nth-child(3) {
    width: 20px;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero image subtle float --- */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@media (prefers-reduced-motion: no-preference) {
    .hero-float {
        animation: float 6s ease-in-out infinite;
    }
}

/* --- Print styles --- */
@media print {
    #navbar, #contact-form, iframe { display: none; }
    body { color: #000; background: #fff; }
}
