/* ========================================
   Wilmington Insurance Agency
   Classic & Elegant Design System
   ======================================== */

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

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(252, 191, 17, 0.3);
    color: #faf5f7;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #2a121a;
}
::-webkit-scrollbar-thumb {
    background: #5f2a3f;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #74314b;
}

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

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

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

@keyframes scrollDot {
    0% {
        top: 0;
        opacity: 1;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

.animate-scroll-dot {
    animation: scrollDot 1.5s ease-in-out infinite;
}

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

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

/* ========================================
   Navbar
   ======================================== */

#navbar {
    backdrop-filter: blur(0px);
    transition: backdrop-filter 0.5s ease, background 0.5s ease, box-shadow 0.5s ease;
}

#navbar.scrolled {
    background: rgba(42, 18, 26, 0.92);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(142, 63, 94, 0.2);
}

.nav-link {
    position: relative;
}

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

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

/* Mobile menu */
#mobile-menu.active {
    opacity: 1 !important;
    pointer-events: all !important;
}

.mobile-link {
    position: relative;
}

/* Menu button animation */
#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

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

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

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

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

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(252, 191, 17, 0), transparent);
    transition: background 0.5s ease;
}

.service-card:hover::before {
    background: linear-gradient(90deg, transparent, rgba(252, 191, 17, 0.6), transparent);
}

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

.testimonial-card {
    position: relative;
}

.testimonial-card::after {
    content: '"';
    position: absolute;
    top: 16px;
    right: 24px;
    font-family: 'Playfair Display', serif;
    font-size: 6rem;
    line-height: 1;
    color: rgba(252, 191, 17, 0.06);
    pointer-events: none;
}

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

select option {
    background: #4f2a3f;
    color: #f5e9ee;
}

/* ========================================
   Intersection Observer Animations
   ======================================== */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    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; }

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

@media (max-width: 767px) {
    .font-serif {
        line-height: 1.1;
    }
}

@media (min-width: 768px) {
    /* Subtle parallax on hero image */
    #hero {
        will-change: transform;
    }
}

/* ========================================
   Focus Visible for Accessibility
   ======================================== */

*:focus-visible {
    outline: 2px solid rgba(252, 191, 17, 0.6);
    outline-offset: 2px;
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    body {
        background: white !important;
        color: #1a1a2e !important;
    }
    
    #navbar,
    .animate-scroll-dot {
        display: none;
    }
}
