/* ===================================
   Clifton Cathcart — Custom Styles
   =================================== */

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(13, 148, 136, 0.2);
    color: #0f766e;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Navbar */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 1.5px;
    background: #5eead4;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

/* Mobile menu */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

#mobile-menu.open {
    max-height: 400px;
    padding-top: 0.5rem;
    padding-bottom: 1rem;
}

.mobile-nav-link {
    position: relative;
    padding-left: 0;
    transition: padding-left 0.3s ease;
}

.mobile-nav-link:hover {
    padding-left: 0.5rem;
}

/* Hero */
.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
}

.hero-content {
    will-change: transform, opacity;
}

.hero-badge {
    will-change: transform, opacity;
}

/* Scroll indicator */
.scroll-line {
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0% { top: -16px; opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* Scroll reveal */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Parallax-lite on hero image */
@media (prefers-reduced-motion: no-preference) {
    #hero .hero-bg img {
        will-change: transform;
        transition: transform 0.1s linear;
    }
}

/* Button focus states */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Smooth image loading */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

img[data-src] {
    opacity: 0;
}

/* Decorative elements */
.divider-line {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #0d9488, #5eead4);
    border-radius: 2px;
}

/* Card hover effects */
.group:hover .group-hover\\:scale-105 {
    transform: scale(1.05);
}

/* Form transitions */
input, textarea {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus, textarea:focus {
    border-color: #14b8a6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

/* Print styles */
@media print {
    #navbar, .hero-scroll-indicator, button {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
    .hero-bg img {
        display: none;
    }
}
