/* Base Reset & Custom Properties */
:root {
    --color-coral-500: #ff6347;
    --color-coral-600: #e84b30;
    --color-charcoal-900: #16171b;
    --color-charcoal-800: #25272c;
    --color-charcoal-700: #373940;
    --color-charcoal-600: #484b54;
    --color-charcoal-500: #5d606b;
    --color-charcoal-400: #7c7f8a;
    --color-charcoal-300: #a1a3aa;
    --color-charcoal-200: #c7c8cc;
    --color-charcoal-100: #e3e4e6;
    --color-charcoal-50: #f6f6f7;
    
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', system-ui, sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-body);
    color: #25272c;
    background-color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Smooth anchor scrolling with offset for fixed nav */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Selection Color */
::selection {
    background-color: #ff6347;
    color: #ffffff;
}

/* Navbar transitions */
.nav-text-color {
    color: #25272c;
    transition: color 0.3s ease;
}

.navbar-scrolled .nav-text-color {
    color: #16171b;
}

.navbar-dark .nav-text-color {
    color: #f6f6f7;
}

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

#mobile-menu.hidden {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

#mobile-menu:not(.hidden) {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* Image optimization */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

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

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

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

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

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

/* Gradient text utility */
.text-gradient-coral {
    background: linear-gradient(135deg, #ff6347, #e84b30);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Subtle pattern backgrounds */
.pattern-grid {
    background-image: linear-gradient(rgba(22, 23, 27, 0.03) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(22, 23, 27, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Button ripple effect */
button::after,
a::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Loading state for form */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Mobile navigation link hover */
.mobile-nav-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e3e4e6;
}

.mobile-nav-link:last-child {
    border-bottom: none;
}

/* Hero parallax-like effect */
.hero-bg {
    will-change: transform;
}

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

/* Print styles */
@media print {
    nav, #contact-form, .animate-bounce {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    a {
        color: #000;
    }
}
