/* ===== Custom Styles for Sullivan Global, Inc. ===== */

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

body {
    overflow-x: hidden;
}

/* ===== Animations ===== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scrollLine {
    0% {
        transform: scaleY(0);
        transform-origin: top;
    }
    50% {
        transform: scaleY(1);
        transform-origin: top;
    }
    51% {
        transform-origin: bottom;
    }
    100% {
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

.animate-fade-up {
    animation: fadeUp 0.8s ease-out forwards;
}

.animate-scroll-line {
    animation: scrollLine 2s ease-in-out infinite;
}

/* ===== Scroll Reveal ===== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

.scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
.scroll-reveal:nth-child(3) { transition-delay: 0.2s; }
.scroll-reveal:nth-child(4) { transition-delay: 0.3s; }
.scroll-reveal:nth-child(5) { transition-delay: 0.4s; }
.scroll-reveal:nth-child(6) { transition-delay: 0.5s; }

/* ===== Navbar ===== */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background: rgba(253, 252, 250, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(120, 31, 40, 0.08);
}

.nav-link {
    position: relative;
}

/* ===== Service Cards ===== */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid rgba(120, 31, 40, 0.08);
    border-radius: inherit;
    transition: border-color 0.5s ease;
    pointer-events: none;
}

.service-card:hover::before {
    border-color: rgba(120, 31, 40, 0);
}

/* ===== Mobile Menu ===== */
#mobile-menu {
    padding: 2rem;
}

.mobile-nav-link {
    position: relative;
}

/* ===== Selection ===== */
::selection {
    background: rgba(120, 31, 40, 0.15);
    color: #781f28;
}

/* ===== Focus Styles ===== */
*:focus-visible {
    outline: 2px solid #781f28;
    outline-offset: 2px;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #faf5f0;
}

::-webkit-scrollbar-thumb {
    background: #e1969f;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #781f28;
}

/* ===== Form Select Arrow ===== */
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='%23781f28' 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;
    padding-right: 2.5rem;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
    .service-card {
        padding: 2rem !important;
    }
}

@media (max-width: 640px) {
    #hero h1 {
        font-size: 2.75rem;
        line-height: 1.1;
    }
}

/* ===== Print Styles ===== */
@media print {
    #navbar,
    #mobile-menu,
    .animate-scroll-line {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
}
