/* ============================================
   Ung's Primary PA — Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: rgba(255, 107, 74, 0.2);
    color: #1a1a1a;
}

/* ============================================
   Navigation
   ============================================ */
#navbar {
    transition: background-color 0.5s ease, backdrop-filter 0.5s ease, padding 0.5s ease;
}

#navbar.scrolled {
    background-color: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

#navbar.scrolled .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
}

#navbar.scrolled #nav-logo-text {
    color: white !important;
}

/* Mobile Menu Button Animation */
#mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

#mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: translateX(10px);
}

#mobile-menu-btn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(3px, -3px);
}

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

.mobile-menu-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background-color: #FF6B4A;
    transition: width 0.3s ease;
}

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

/* ============================================
   Hero Section
   ============================================ */
.scroll-line {
    position: relative;
}

.scroll-line-fill {
    animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
    0% {
        top: -50%;
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        top: 150%;
        opacity: 0;
    }
}

/* Hero Animations */
.hero-tag {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.3s;
    opacity: 0;
}

.hero-title {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.5s;
    opacity: 0;
}

.hero-subtitle {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.7s;
    opacity: 0;
}

.hero-ctas {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.9s;
    opacity: 0;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Reveal Animations
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.reveal[data-delay="100"] {
    transition-delay: 100ms;
}

.reveal[data-delay="200"] {
    transition-delay: 200ms;
}

.reveal[data-delay="300"] {
    transition-delay: 300ms;
}

/* ============================================
   Service Cards
   ============================================ */
.service-card {
    position: relative;
    transition: background-color 0.5s ease, transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-4px);
}

/* ============================================
   Form Styles
   ============================================ */
input:focus,
textarea:focus {
    border-color: #FF6B4A !important;
    box-shadow: 0 0 0 3px rgba(255, 107, 74, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: #c4c4c4;
}

/* ============================================
   Utility & Misc
   ============================================ */
@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;
        transform: none;
    }
}

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

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

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

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

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

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