/* ── Custom styles that complement Tailwind ───────── */

/* Smooth scrolling for the whole page */
html {
    scroll-padding-top: 80px;
}

/* Selection color */
::selection {
    background: rgba(34, 197, 94, 0.25);
    color: #0b1330;
}

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

/* ── Focus styles for accessibility ────────────────── */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #86efac;
    outline-offset: 4px;
    border-radius: 8px;
}

/* ── 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 !important; transform: none !important; }
    .float-slow, .float-medium, .float-fast { animation: none !important; }
    .spin-slow, .spin-slow-reverse { animation: none !important; }
}

/* ── Custom scrollbar ──────────────────────────────── */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #0b1330;
}
::-webkit-scrollbar-thumb {
    background: #172b82;
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: #1e36a8;
}

/* ── Body light section scrollbar ──────────────────── */
body:not(#hero)::-webkit-scrollbar-track {
    background: #f8fafc;
}

/* ── Image lazy loading fade ───────────────────────── */
img[loading="lazy"] {
    transition: opacity 0.4s ease;
}
img[loading="lazy"]:not(.loaded) {
    opacity: 0;
}
img[loading="lazy"].loaded {
    opacity: 1;
}

/* ── Print styles ──────────────────────────────────── */
@media print {
    nav, #backToTop, .wave-divider, button { display: none !important; }
    body { background: white !important; color: black !important; }
    section { padding: 20px 0 !important; }
}
