/* ============================================
   The SweetEasy Co. — Custom Styles
   Classic & Elegant · Forest Green + Off-White
   ============================================ */

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: #2d422d;
    color: #faf9f7;
}

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

::-webkit-scrollbar-track {
    background: #f5f3ef;
}

::-webkit-scrollbar-thumb {
    background: #9bb99b;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4f714f;
}

/* --- Navbar --- */
#navbar {
    background: transparent;
    transition: background-color 0.5s ease, box-shadow 0.5s ease;
}

#navbar.scrolled {
    background-color: rgba(250, 249, 247, 0.97);
    box-shadow: 0 1px 0 rgba(45, 66, 45, 0.1);
}

#navbar.scrolled .nav-link {
    color: #2d422d;
}

#navbar.scrolled .nav-link:hover {
    color: #4f714f;
}

#navbar.scrolled #nav-logo {
    color: #2d422d;
}

/* --- Navigation Links --- */
.nav-link {
    position: relative;
}

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

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

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

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

.mobile-link {
    position: relative;
    padding-left: 0;
}

/* --- Hero Images --- */
#hero img {
    transition: transform 0.7s ease;
}

/* --- Gallery Images --- */
#gallery img {
    cursor: pointer;
}

/* --- Form Elements --- */
input::placeholder,
textarea::placeholder {
    color: #d8d3ca;
}

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='%239bb99b' 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 0 center;
    padding-right: 2rem;
}

/* --- Scroll Reveal Animations --- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Reduced motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal-left {
        opacity: 0;
        transform: translateX(-30px);
    }
    
    .reveal-left.revealed {
        opacity: 1;
        transform: translateX(0);
    }
    
    .reveal-right {
        opacity: 0;
        transform: translateX(30px);
    }
    
    .reveal-right.revealed {
        opacity: 1;
        transform: translateX(0);
    }
}

/* --- Button Hover Effects --- */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* --- Smooth image loading --- */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* --- Focus styles for accessibility --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #4f714f;
    outline-offset: 2px;
}

/* --- Responsive adjustments --- */
@media (max-width: 767px) {
    #hero h1 {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    #hero h1 span {
        display: inline;
    }
    
    #about .font-serif.text-4xl,
    #menu h2,
    #gallery h2,
    #visit h2,
    #contact h2 {
        font-size: 2.25rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    #hero h1 {
        font-size: 3.5rem;
    }
}

/* --- Print styles --- */
@media print {
    #navbar,
    #mobile-menu-btn,
    #contact-form,
    button {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    a {
        text-decoration: underline;
        color: black !important;
    }
}
