/* ========================================
   Four Townes Florist — Custom Styles
   ======================================== */

/* --- Base & Typography --- */
html {
    scroll-behavior: smooth;
}

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

::selection {
    background-color: #527732;
    color: #faf9f6;
}

/* --- Section Label --- */
.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #527732;
}

/* --- Hero Animations (above the fold — always visible by default) --- */
.hero-content {
    animation: heroFadeIn 0.8s ease-out both;
}

.hero-image-wrapper {
    animation: heroImageIn 0.8s ease-out 0.2s both;
}

.floating-card {
    animation: floatCard 0.6s ease-out 0.6s both;
}

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

@keyframes heroImageIn {
    from {
        opacity: 0;
        transform: translateY(32px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

/* --- Navbar --- */
#navbar {
    background-color: rgba(250, 249, 246, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(45, 69, 30, 0.08);
}

#navbar.scrolled {
    background-color: rgba(250, 249, 246, 0.95);
    box-shadow: 0 1px 20px rgba(45, 69, 30, 0.08);
}

/* --- Mobile Menu --- */
.mobile-link {
    opacity: 1;
}

/* --- Service Cards --- */
.service-card {
    transform: translateY(0);
}

.service-card:hover {
    transform: translateY(-4px);
}

/* --- Gallery --- */
.gallery-item {
    cursor: pointer;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(30, 45, 22, 0.3) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: inherit;
}

.gallery-item:hover::after {
    opacity: 1;
}

.gallery-item {
    position: relative;
}

/* --- Testimonial Cards --- */
.testimonial-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
}

/* --- Scroll Reveal (below the fold only, progressive enhancement) --- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

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

/* --- Back to Top --- */
#backToTop {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#backToTop.visible {
    opacity: 1;
    pointer-events: auto;
}

#backToTop:not(.visible) {
    transform: translateY(8px);
}

#backToTop:hover {
    transform: translateY(-2px);
}

/* --- Form Focus States --- */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* --- Smooth image loading --- */
img {
    display: block;
}

/* --- Print Styles --- */
@media print {
    nav, #backToTop, button {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}

/* --- Responsive Adjustments --- */
@media (max-width: 767px) {
    .hero-content h1 {
        font-size: 2.75rem;
    }
    
    .floating-card {
        position: relative;
        bottom: auto;
        left: auto;
        margin-top: 1rem;
        max-width: 100%;
    }
}

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