/* Base styles and custom utilities */
html {
    scroll-behavior: smooth;
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f6f6f7;
}
::-webkit-scrollbar-thumb {
    background: #c7c8cc;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a1a4aa;
}

/* Selection color */
::selection {
    background: #ff7c60;
    color: white;
}

/* Navbar transition states */
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(45, 49, 57, 0.08);
}

#navbar.scrolled .nav-link {
    color: #40454f;
}

#navbar.scrolled .font-serif {
    color: #1f2229;
}

/* Mobile menu animation */
#mobile-menu.open {
    transform: translateX(0);
}

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

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

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

/* Fade-in animation for scroll reveals */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.fade-in-up.delay-1 {
    animation-delay: 0.1s;
}

.fade-in-up.delay-2 {
    animation-delay: 0.2s;
}

.fade-in-up.delay-3 {
    animation-delay: 0.3s;
}

/* Pulse animation for the dot */
@keyframes softPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.2);
    }
}

.animate-pulse {
    animation: softPulse 2s ease-in-out infinite;
}

/* Hover lift effect for cards */
.group:hover .group-hover\\:scale-110 {
    transform: scale(1.1);
}

/* Image aspect ratio utilities */
.aspect-\[4\/5\] {
    aspect-ratio: 4/5;
}

.aspect-\[3\/4\] {
    aspect-ratio: 3/4;
}

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

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Tablet breakpoint adjustments */
@media (max-width: 768px) {
    .font-serif {
        font-size: 2rem;
    }
}

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

/* Loading state for images */
img {
    background: linear-gradient(135deg, #f6f6f7 0%, #e3e4e6 100%);
}

/* Subtle pattern overlay for sections */
.bg-pattern {
    background-image: radial-gradient(circle at 1px 1px, rgba(255, 124, 96, 0.05) 1px, transparent 0);
    background-size: 40px 40px;
}
