/* ============================================
   Baylis & Thanner Collective — Custom Styles
   ============================================ */

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(251, 191, 36, 0.3);
    color: #3a1733;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f0f7;
}
::-webkit-scrollbar-thumb {
    background: #be90bf;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a561a1;
}

/* ============================================
   Animations
   ============================================ */

/* Hero entrance animations — above the fold, always visible */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fade-in {
    animation: fadeIn 1s ease forwards;
}

/* Scroll reveal — below the fold only */
.reveal-on-scroll {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-on-scroll[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-on-scroll[data-reveal] {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal-on-scroll[data-reveal],
    .reveal-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ============================================
   Navigation
   ============================================ */

#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(77, 30, 68, 0.08);
}

.nav-link {
    position: relative;
}

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

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

/* ============================================
   Hero Section
   ============================================ */

#hero {
    position: relative;
}

#hero::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, white, transparent);
    z-index: 1;
    pointer-events: none;
}

/* ============================================
   Service Cards
   ============================================ */

.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #fbbf24, #d97706);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* ============================================
   Testimonial Cards
   ============================================ */

.testimonial-card {
    position: relative;
}

.testimonial-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    border: 1px solid transparent;
    transition: border-color 0.3s ease;
    pointer-events: none;
}

.testimonial-card:hover::after {
    border-color: rgba(251, 191, 36, 0.2);
}

/* ============================================
   Form Styles
   ============================================ */

select option {
    background: #fff;
    color: #3a1733;
}

input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15);
}

/* ============================================
   Neighborhood Cards
   ============================================ */

.neighborhood-card .aspect-ratio-wrapper {
    position: relative;
    overflow: hidden;
}

.neighborhood-card .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(58, 23, 51, 0.4) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.neighborhood-card:hover .overlay {
    opacity: 1;
}

/* ============================================
   Responsive Adjustments
   ============================================ */

@media (max-width: 768px) {
    #hero::before {
        height: 80px;
    }

    .font-serif.text-4xl {
        font-size: 2.25rem;
    }
}

@media (min-width: 768px) {
    .reveal-on-scroll[data-reveal] {
        opacity: 0;
        transform: translateY(30px);
    }
}
