/* ============================================
   Finley's Painting — Custom Styles
   ============================================ */

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(27, 67, 50, 0.15);
    color: #1B4332;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #F5F5F0;
}
::-webkit-scrollbar-thumb {
    background: #b7d0b5;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #8fb88d;
}

/* --- Hero Animations --- */
@keyframes scrollLine {
    0% { transform: translateY(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(100%); opacity: 0; }
}

.animate-scroll-line {
    animation: scrollLine 1.8s ease-in-out infinite;
}

/* --- Navbar --- */
#navbar.scrolled {
    background: rgba(250, 250, 247, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(27, 67, 50, 0.08);
}

#navbar.scrolled .font-serif {
    color: #1B4332;
}

#navbar.scrolled a:not(.bg-forest) {
    color: #1B4332;
}

#navbar.scrolled .mobile-link {
    color: #1B4332;
}

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

#menu-icon span:nth-child(1) {
    transform-origin: center;
}
#menu-icon span:nth-child(2) {
    transform-origin: center;
}
#menu-icon span:nth-child(3) {
    transform-origin: center;
}

body.menu-open #menu-icon span:nth-child(1) {
    transform: translateY(4.5px) rotate(45deg);
}
body.menu-open #menu-icon span:nth-child(2) {
    opacity: 0;
}
body.menu-open #menu-icon span:nth-child(3) {
    transform: translateY(-4.5px) rotate(-45deg);
    width: 1.25rem;
}

/* --- Scroll Reveal --- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal.revealed {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
    .animate-scroll-line {
        animation: none;
        opacity: 0.7;
    }
}

/* --- Select styling --- */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231B4332' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* --- Form focus states --- */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 1px #52B788;
}

/* --- Button hover lift --- */
a[href="#contact"],
button[type="submit"] {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

a[href="#contact"]:hover,
button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(27, 67, 50, 0.2);
}

/* --- Image hover containers --- */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* --- Print --- */
@media print {
    #navbar,
    #hero-scroll,
    .reveal {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
}
