/* ============================================
   CASEY MESSENGER REALTOR® — ST. AUGUSTINE
   Clean Minimalist Design System
   ============================================ */

/* 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;
    padding: 0;
    overflow-x: hidden;
}

/* Smooth Scroll */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav-link {
    position: relative;
}

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

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

/* Mobile Menu */
#mobile-menu {
    transition: opacity 0.3s ease, pointer-events 0.3s ease;
}

#mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

.menu-line {
    transition: all 0.3s ease;
}

#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(2px, 2px);
}

#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-btn.active .menu-line:nth-child(3) {
    width: 6px;
    transform: rotate(-45deg) translate(2px, -2px);
}

/* ============================================
   HERO ANIMATIONS
   ============================================ */
.hero-line {
    display: inline-block;
    transform: translateY(100%);
    animation: slideUp 0.8s ease forwards;
}

.hero-line:nth-child(1) { animation-delay: 0.1s; }
.hero-line:nth-child(2) { animation-delay: 0.2s; }
.hero-line:nth-child(3) { animation-delay: 0.3s; }
.hero-line:nth-child(4) { animation-delay: 0.4s; }

@keyframes slideUp {
    to {
        transform: translateY(0);
    }
}

.hero-tag {
    animation: fadeIn 0.6s ease 0.3s both;
}

.hero-fade {
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
}

.hero-fade:nth-child(1) { animation-delay: 0.5s; }
.hero-fade:nth-child(2) { animation-delay: 0.6s; }

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

.hero-image {
    animation: imageReveal 1s ease 0.4s both;
}

@keyframes imageReveal {
    from {
        opacity: 0;
        transform: scale(0.97);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.hero-card {
    animation: cardFloat 0.8s ease 1s both;
}

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

/* Scroll line animation */
.animate-scroll-line {
    animation: scrollDown 1.5s ease-in-out infinite;
}

@keyframes scrollDown {
    0% {
        transform: translateY(-100%);
    }
    50% {
        transform: translateY(100%);
    }
    100% {
        transform: translateY(100%);
    }
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    
    .reveal-up.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal-left {
        opacity: 0;
        transform: translateX(-30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    
    .reveal-left.revealed {
        opacity: 1;
        transform: translateX(0);
    }
    
    .reveal-right {
        opacity: 0;
        transform: translateX(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    
    .reveal-right.revealed {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   NAVBAR SCROLL STATE
   ============================================ */
#navbar.scrolled {
    background: rgba(248, 250, 252, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

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

/* ============================================
   SELECT STYLING
   ============================================ */
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' 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 1rem center;
    appearance: none;
    -webkit-appearance: none;
}

/* ============================================
   FOCUS STYLES
   ============================================ */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 1px #0d9488;
}

/* ============================================
   UTILITY & ACCESSIBILITY
   ============================================ */
@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: 640px) {
    .font-serif {
        line-height: 1.1;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    /* Tablet adjustments if needed */
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    nav,
    .animate-scroll-line,
    #contact-form {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    a {
        color: #0d9488;
    }
}
