/* ============================================
   Surface Specialists Of The Triad
   Custom Styles — Editorial / Bold Design
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: #B85446;
    color: #FDF8F3;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FDF8F3;
}
::-webkit-scrollbar-thumb {
    background: #D4915E;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #B85446;
}

/* ============================================
   Animations
   ============================================ */

/* Hero entrance animations */
@keyframes heroUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-up {
    animation: heroUp 0.8s ease-out forwards;
}

/* Scroll reveal */
@keyframes revealUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    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);
}

/* Staggered reveal delays */
.reveal:nth-child(1) { transition-delay: 0s; }
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }
.reveal:nth-child(5) { transition-delay: 0.4s; }

/* ============================================
   Navigation
   ============================================ */

#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(253, 248, 243, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

#navbar.scrolled .nav-link {
    color: rgba(44, 36, 32, 0.7);
}

/* Mobile menu */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Menu button animation */
.menu-line {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: translateX(10px);
}
#menuBtn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 24px;
    margin-left: 0;
}

/* ============================================
   Hero Section
   ============================================ */

.hero-tag {
    animation: heroUp 0.6s ease-out 0.05s forwards;
}

.hero-headline {
    animation: heroUp 0.8s ease-out forwards;
}

.hero-subtext {
    animation: heroUp 0.8s ease-out forwards;
}

/* ============================================
   Service Cards
   ============================================ */

.service-card {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.5s ease,
                box-shadow 0.5s ease;
}

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

/* ============================================
   Buttons
   ============================================ */

button, a[type="submit"] {
    position: relative;
    overflow: hidden;
}

button::after, a[type="submit"]::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

button:hover::after, a[type="submit"]::after {
    opacity: 1;
}

/* ============================================
   Form Styles
   ============================================ */

input:focus, select:focus, textarea:focus {
    outline: none;
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23B85446' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ============================================
   Utility: Smooth image loading
   ============================================ */

img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* ============================================
   Responsive adjustments
   ============================================ */

@media (max-width: 767px) {
    .font-serif {
        line-height: 1.1;
    }
}

@media (min-width: 1024px) {
    .service-card {
        /* Subtle parallax-like depth on hover */
        will-change: transform;
    }
}

/* ============================================
   Print styles
   ============================================ */

@media print {
    #navbar, #mobileMenu {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}
