/* ============================================
   Kate Washington Real Estate — Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #0d9488;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #0f766e;
}

/* Selection */
::selection {
    background: #0d9488;
    color: #ffffff;
}

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

/* Light nav (on hero with dark overlay, text is light) */
.nav-text {
    color: #f8fafc;
}

/* Dark nav (on white/light sections) */
nav.scrolled .nav-text {
    color: #0f172a;
}

nav.scrolled .nav-link {
    color: #0f172a;
}

nav.scrolled .menu-line {
    background: #0f172a;
}

nav.scrolled .mobile-link {
    color: #0f172a;
}

nav.scrolled .scroll-line {
    background: linear-gradient(to bottom, #0f172a/50, transparent);
}

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

.hero-subtitle {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.hero-title {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

.hero-desc {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

.hero-cta {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.8s;
    opacity: 0;
}

.hero-card {
    animation: fadeInUp 1s ease forwards;
    animation-delay: 1s;
    opacity: 0;
}

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

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

/* Scroll line animation */
.scroll-line {
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.5); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ============================================
   Scroll Reveal Animations
   ============================================ */

.reveal-up {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-left {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-right {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* These are progressive enhancement — content is visible by default.
   JS adds the animated states for users with JS enabled. */

.js-active .reveal-up {
    opacity: 0;
    transform: translateY(30px);
}

.js-active .reveal-left {
    opacity: 0;
    transform: translateX(-30px);
}

.js-active .reveal-right {
    opacity: 0;
    transform: translateX(30px);
}

.reveal-up.revealed,
.reveal-left.revealed,
.reveal-right.revealed {
    opacity: 1;
    transform: translate(0);
}

/* Staggered delays for grid items */
.service-card:nth-child(1) { transition-delay: 0.1s; }
.service-card:nth-child(2) { transition-delay: 0.2s; }
.service-card:nth-child(3) { transition-delay: 0.3s; }

.area-item:nth-child(1) { transition-delay: 0.1s; }
.area-item:nth-child(2) { transition-delay: 0.2s; }
.area-item:nth-child(3) { transition-delay: 0.3s; }
.area-item:nth-child(4) { transition-delay: 0.4s; }

.testimonial-card:nth-child(1) { transition-delay: 0.1s; }
.testimonial-card:nth-child(2) { transition-delay: 0.2s; }
.testimonial-card:nth-child(3) { transition-delay: 0.3s; }

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

.service-card {
    transition: border-color 0.5s ease, box-shadow 0.5s ease;
}

.service-card:hover {
    box-shadow: 0 20px 60px rgba(13, 148, 136, 0.08);
}

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

.testimonial-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.06);
}

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

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='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

/* ============================================
   Mobile Menu
   ============================================ */

.mobile-link {
    /* Initial state handled by JS */
}

/* ============================================
   Reduced Motion
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
    }
}

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

@media (max-width: 767px) {
    .font-serif.text-5xl {
        font-size: 2.5rem;
    }
    
    .font-serif.text-4xl {
        font-size: 2rem;
    }
}
