/* === Custom Styles for Pereira Painting === */

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

/* Base font smoothing */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* === Scroll Reveal Animations === */
.scroll-reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

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

/* === Navbar transitions === */
#navbar {
    background-color: transparent;
}

#navbar.scrolled {
    background-color: rgba(30, 30, 30, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.15);
}

.nav-text {
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.3s ease;
}

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

/* === Mobile menu === */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-link {
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.mobile-link:hover {
    color: #f5a28a;
    padding-left: 0.5rem;
}

/* === Form styles === */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(232, 106, 84, 0.15);
}

/* Custom select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5l3 3 3-3' stroke='%23787878' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* === Button hover animations === */
a, button {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* === Subtle card hover === */
.rounded-lg {
    transition: box-shadow 0.3s ease;
}

/* === Accessibility: focus visible === */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #e86a54;
    outline-offset: 2px;
}

/* === Print styles === */
@media print {
    #navbar,
    #mobile-menu,
    .scroll-reveal {
        display: none;
    }

    body {
        color: #1e1e1e;
        background: white;
    }

    a {
        color: #1e1e1e;
    }
}

/* === Narrow mobile adjustments === */
@media (max-width: 360px) {
    .font-serif {
        font-size: clamp(1.5rem, 8vw, 2rem);
    }
}
