/* ============================================
   TAYLOR PEOPLES - REALTOR WEBSITE
   Bold Editorial Style: Emerald + Cream
   ============================================ */

/* --- Base Reset & Typography --- */
*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    overflow-x: hidden;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #15803d;
}

/* --- Selection --- */
::selection {
    background: #166534;
    color: #fefdf8;
}

/* --- Navigation --- */
.nav-text {
    transition: color 0.3s ease;
}

.nav-link {
    position: relative;
}

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

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

/* Mobile nav link underline */
.mobile-nav-link {
    position: relative;
}

/* --- Hero Animations --- */
.hero-subtitle {
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeUp 0.8s ease forwards 0.3s;
}

.hero-title {
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeUp 0.8s ease forwards 0.5s;
}

.hero-desc {
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeUp 0.8s ease forwards 0.7s;
}

.hero-cta {
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeUp 0.8s ease forwards 0.9s;
}

@keyframes heroFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Scroll Reveal Animations --- */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1; /* Always visible by default for accessibility */
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-up {
    transform: translateY(0);
}

.reveal-left {
    transform: translateX(0);
}

.reveal-right {
    transform: translateX(0);
}

/* Animated states — applied via JS only */
.reveal-animate.reveal-up {
    transform: translateY(40px);
    opacity: 0;
}

.reveal-animate.reveal-left {
    transform: translateX(-40px);
    opacity: 0;
}

.reveal-animate.reveal-right {
    transform: translateX(40px);
    opacity: 0;
}

.reveal-animate.reveal-visible.reveal-up {
    opacity: 1;
    transform: translateY(0);
}

.reveal-animate.reveal-visible.reveal-left {
    opacity: 1;
    transform: translateX(0);
}

.reveal-animate.reveal-visible.reveal-right {
    opacity: 1;
    transform: translateX(0);
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal-up,
    .reveal-left,
    .reveal-right {
        transform: none;
        opacity: 1;
    }
    
    .hero-subtitle,
    .hero-title,
    .hero-desc,
    .hero-cta {
        opacity: 1;
        transform: none;
        animation: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* --- Form Styles --- */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

/* --- Service Card Hover --- */
.group:hover .group-hover\:bg-emerald-700\/60 {
    background-color: rgba(29, 104, 59, 0.6);
}

/* --- Image Hover --- */
img {
    display: block;
}

/* --- Focus Visible --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #16a34a;
    outline-offset: 2px;
    border-radius: 4px;
}

/* --- Navbar Scroll State --- */
.nav-scrolled {
    background: rgba(254, 253, 248, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(20, 83, 45, 0.08);
}

.nav-scrolled .nav-text {
    color: #14532d !important;
}

.nav-scrolled .nav-link {
    color: #166534 !important;
}

.nav-scrolled .nav-link:hover {
    color: #15803d !important;
}

/* --- Mobile Menu Transition --- */
#mobile-menu {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Image Hover Scale --- */
overflow-hidden img {
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Print Styles --- */
@media print {
    nav, #contact-form, .reveal-animate {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .font-serif {
        color: #000;
    }
}
