/* ========================================
   Advantage Title Insurance & Settlement
   Custom Styles
   ======================================== */

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

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: #b53a34;
    color: #fefdfb;
}

/* ========================================
   Navigation
   ======================================== */
.nav-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-scrolled {
    background-color: rgba(254, 253, 251, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(42, 31, 26, 0.08);
}

.nav-scrolled .nav-link {
    color: #3d2e28;
}

.nav-scrolled .logo-text {
    color: #2a1f1a;
}

/* ========================================
   Hero Section
   ======================================== */
.hero-section {
    position: relative;
}

.hero-overlay {
    background: linear-gradient(
        135deg,
        rgba(26, 19, 16, 0.82) 0%,
        rgba(42, 31, 26, 0.72) 50%,
        rgba(61, 46, 40, 0.65) 100%
    );
}

/* Floating Cards */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

.card-1 {
    animation-delay: 0s;
}

.card-2 {
    animation-delay: -2s;
}

.card-3 {
    animation-delay: -4s;
}

.card-4 {
    animation-delay: -1s;
    animation-duration: 5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
}

/* ========================================
   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, #b53a34, #e0ad55);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ========================================
   Process Steps
   ======================================== */
.process-step {
    position: relative;
}

/* ========================================
   Testimonial Cards
   ======================================== */
.testimonial-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(42, 31, 26, 0.1);
}

/* ========================================
   Mobile Menu
   ======================================== */
#mobileMenu {
    max-height: 0;
    opacity: 0;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

#mobileMenu.open {
    max-height: 400px;
    opacity: 1;
}

.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(235, 195, 123, 0.15);
}

.mobile-link:last-child {
    border-bottom: none;
}

/* ========================================
   Scroll Animations (Progressive Enhancement)
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    }

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

    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* ========================================
   Form Styles
   ======================================== */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 767px) {
    .font-serif {
        word-break: keep-all;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .floating-card {
        transform: scale(0.9);
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .nav-fixed,
    .floating-card,
    #hero {
        display: none;
    }

    body {
        color: #000;
        background: #fff;
    }

    section {
        page-break-inside: avoid;
    }
}
