/* ============================================
   Milo's Tax & Accounting — Custom Styles
   ============================================ */

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

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

body {
    min-height: 100vh;
}

/* Selection */
::selection {
    background-color: #8a1c1c;
    color: white;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f5f5;
}
::-webkit-scrollbar-thumb {
    background: #d4d4d4;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a3a3a3;
}

/* Navbar */
.nav-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
}

.nav-scrolled {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Mobile Menu */
.mobile-link {
    display: block;
    padding: 0.5rem 0;
}

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

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #8a1c1c, #a82424);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

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

/* Scroll Reveal Animations */
/* Default state: visible (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* When JS is enabled and prefers-reduced-motion is off, start hidden */
@media (prefers-reduced-motion: no-preference) {
    .js-enabled .reveal {
        opacity: 0;
        transform: translateY(24px);
    }
    .js-enabled .reveal.revealed {
        opacity: 1;
        transform: none;
    }
}

/* Staggered delays */
.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; }

/* Select styling */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a3a3a3' 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;
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid #8a1c1c;
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .reveal,
    .js-enabled .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .service-card::after {
        transition: none;
    }
}

/* Tablet */
@media (max-width: 768px) {
    .nav-fixed {
        position: fixed;
    }

    /* Ensure hero is accessible on mobile */
    section#top {
        min-height: auto;
        padding: 8rem 0 4rem;
    }
}

/* Small mobile */
@media (max-width: 360px) {
    .max-w-7xl {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
