/* ========================================
   Robert J Maro, MD — Custom Styles
   ======================================== */

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

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

body {
    overflow-x: hidden;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 9999;
    padding: 0.75rem 1.5rem;
    background: #7B2D3B;
    color: #fff;
    font-weight: 600;
    border-radius: 0 0 0.5rem 0.5rem;
    text-decoration: none;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}

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

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

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

/* Mobile Menu */
.mobile-nav-link {
    position: relative;
}

/* Reveal Animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    html {
        scroll-behavior: auto;
    }

    .group:hover .group-hover\:translate-x-1 {
        transform: none;
    }
}

/* Mobile Menu Transitions */
#mobile-menu {
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Header Scroll State */
#header.scrolled {
    box-shadow: 0 1px 20px rgba(123, 45, 59, 0.08);
}

/* Back to Top */
#back-to-top {
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#back-to-top:hover {
    box-shadow: 0 8px 25px rgba(123, 45, 59, 0.35);
}

/* Selection */
::selection {
    background: #fce7eb;
    color: #4A0D17;
}

/* Focus */
:focus-visible {
    outline: 2px solid #7B2D3B;
    outline-offset: 2px;
}

/* Image Optimization */
img {
    max-width: 100%;
    height: auto;
}

/* Form Inputs */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(123, 45, 59, 0.1);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #a31637;
}

/* Print */
@media print {
    header,
    #back-to-top,
    #mobile-menu {
        display: none !important;
    }

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

    .bg-burgundy-950 {
        background: #fff !important;
        color: #000 !important;
    }
}
