/* Custom styles and overrides */

/* Smooth scroll offset for fixed nav */
section[id] {
    scroll-margin-top: 80px;
}

/* Selection color */
::selection {
    background-color: #0d9488;
    color: white;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
    border-radius: 4px;
}

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

/* Ensure hero text is readable */
.hero-bg h1,
.hero-bg h2 {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Stat card subtle glow on hover */
.stat-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.13);
}

/* Navbar transition */
#navbar {
    will-change: background, box-shadow;
}

/* Image loading placeholder */
img {
    background-color: #e2e8f0;
}

/* Mobile menu transitions */
#mobile-panel {
    transition: transform 0.3s ease;
}

/* Prevent content flash */
@media (prefers-reduced-motion: no-preference) {
    .reveal-hidden {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    .reveal-hidden.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Print styles */
@media print {
    nav, #mobile-menu, form, .reveal-hidden {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
    .hero-bg {
        background: #1e293b !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
