/* ============================================
   R Travis Windham Insurance Agency
   Custom Stylesheet
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --burgundy-700: #9c2240;
    --burgundy-800: #811e38;
    --burgundy-900: #6c1b31;
    --blush-100: #fdf0f2;
    --cream: #FAF8F6;
    --charcoal: #1a1a1a;
    --warmgray: #6b6560;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Selection --- */
::selection {
    background: var(--burgundy-800);
    color: var(--cream);
}

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

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

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

/* Mobile Menu */
.menu-line {
    transition: all 0.3s ease;
}

#menuBtn.active .menu-line:first-child {
    transform: rotate(45deg) translate(3px, 3px);
}

#menuBtn.active .menu-line:last-child {
    transform: rotate(-45deg) translate(3px, -3px);
}

.mobile-menu-open {
    overflow: hidden;
}

#mobileMenu.menu-open {
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    position: relative;
}

/* --- Hero Animations --- */
.hero-subtitle {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.2s;
}

.hero-headline span span {
    animation: slideUp 0.8s ease forwards;
}

.hero-headline span:nth-child(1) span {
    animation-delay: 0.3s;
}

.hero-headline span:nth-child(2) span {
    animation-delay: 0.45s;
}

.hero-headline span:nth-child(3) span {
    animation-delay: 0.6s;
}

.hero-desc {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.75s;
}

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

.hero-stats {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 1.05s;
}

.hero-image-wrapper {
    animation: fadeIn 1.2s ease forwards;
    animation-delay: 0.5s;
    opacity: 0;
}

.hero-float-card {
    animation: floatIn 0.8s ease forwards;
    animation-delay: 1.2s;
    opacity: 0;
    transform: translateY(20px);
}

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

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

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

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

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

/* --- Section Labels & Titles --- */
.section-label {
    position: relative;
    display: inline-block;
}

.section-label::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 50%;
    width: 12px;
    height: 1px;
    background: currentColor;
}

.section-title {
    position: relative;
}

/* --- Service Cards --- */
.service-card {
    position: relative;
    transition: all 0.5s ease;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: var(--burgundy-700);
    transition: height 0.5s ease;
}

.service-card:hover::before {
    height: 100%;
}

/* --- Coverage Cards --- */
.coverage-card {
    transition: all 0.5s ease;
}

.coverage-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(108, 27, 49, 0.08);
}

/* --- Testimonial Cards --- */
.testimonial-card {
    transition: all 0.5s ease;
    position: relative;
    overflow: hidden;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    right: 20px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 120px;
    color: var(--blush-100);
    line-height: 1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.testimonial-card:hover::before {
    opacity: 1;
}

/* --- Contact Items --- */
.contact-item {
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateX(8px);
}

/* --- Form Inputs --- */
.form-input {
    background: transparent;
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: 14px;
    color: var(--charcoal);
}

.form-input::placeholder {
    color: #d1d5db;
}

.form-input:focus {
    border-bottom-color: var(--burgundy-600);
}

.form-input option {
    color: var(--charcoal);
}

/* --- Scroll Reveal --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s 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; }

/* --- Back to Top --- */
#backToTop.visible {
    opacity: 1;
    pointer-events: all;
}

/* --- Responsive Adjustments --- */
@media (max-width: 767px) {
    .section-label::before {
        display: none;
    }

    .hero-float-card {
        display: none;
    }

    .about-image-wrapper img {
        height: 350px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .hero-image-wrapper img {
        height: 500px;
    }
}

/* --- 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 {
        opacity: 1;
        transform: none;
    }
}

/* --- Print Styles --- */
@media print {
    nav, #backToTop, .scroll-line {
        display: none;
    }

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

    .hero-headline span span {
        animation: none;
        opacity: 1;
        transform: none;
    }
}
