/* ===================================
   Bloch Alan J - Structural Engineering
   Custom Styles
==================================== */

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background: #C27C60;
    color: #fff;
}

/* Smooth Scroll */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Scroll Reveal - Progressive Enhancement */
@media (prefers-reduced-motion: no-preference) {
    .fade-up {
        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);
    }
    
    .fade-up.visible {
        opacity: 1;
        transform: translateY(0);
    }
    
    .line-reveal {
        width: 0;
        height: 1px;
        background: #C27C60;
        transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .line-reveal.visible {
        width: 80px;
    }
}

/* Scroll Indicator Animation */
@keyframes scrollDown {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(400%); }
}

.animate-scroll {
    animation: scrollDown 1.5s ease-in-out infinite;
}

/* Navbar Scroll State */
.nav-scrolled {
    background: rgba(245, 240, 235, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.nav-scrolled .nav-link {
    color: #2C2C2C;
}

.nav-scrolled .logo-text {
    color: #2C2C2C;
}

/* Custom Select Styling */
select option {
    background: #fff;
    color: #2C2C2C;
    padding: 12px;
}

/* Focus Visible */
*:focus-visible {
    outline: 2px solid #C27C60;
    outline-offset: 2px;
}

/* Button Active State */
button:active,
a:active {
    transform: scale(0.98);
}

/* Image Loading */
img {
    background-color: #E8DFD5;
}

/* Print Styles */
@media print {
    .fade-up, .line-reveal {
        opacity: 1 !important;
        transform: none !important;
    }
    
    .mobile-menu {
        display: none;
    }
}

/* 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;
    }
}

/* High Contrast Mode */
@media (forced-colors: active) {
    .btn-primary {
        border: 2px solid currentColor;
    }
}
