/* ========================================
   L.J. Loeffler Systems — Custom Styles
   ======================================== */

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

body {
    overflow-x: hidden;
}

::selection {
    background: #B85446;
    color: #FDF9F5;
}

/* ========================================
   Typography
   ======================================== */
.font-display {
    font-family: 'Playfair Display', Georgia, serif;
}

.font-body {
    font-family: 'Inter', system-ui, sans-serif;
}

/* ========================================
   Navbar
   ======================================== */
#navbar {
    background: rgba(253, 249, 245, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(180, 195, 210, 0.3);
}

#navbar.scrolled {
    background: rgba(253, 249, 245, 0.97);
    box-shadow: 0 1px 20px rgba(8, 24, 37, 0.06);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: #B85446;
    transition: width 0.3s ease;
}

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

/* Mobile menu */
.mobile-link {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

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

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

/* Hamburger */
.menu-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#menuBtn.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.25rem;
}

/* ========================================
   Hero
   ======================================== */
.hero-eyebrow {
    animation: heroFadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(20px);
}

.hero-title {
    animation: heroFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
    opacity: 0;
    transform: translateY(28px);
}

.hero-subtitle {
    animation: heroFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
    opacity: 0;
    transform: translateY(24px);
}

.hero-cta {
    animation: heroFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
    opacity: 0;
    transform: translateY(20px);
}

.hero-stats {
    animation: heroFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.45s forwards;
    opacity: 0;
    transform: translateY(20px);
}

.hero-image {
    animation: heroImageIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
    opacity: 0;
    transform: scale(1.04);
}

.hero-image-wrapper {
    animation: heroImageIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
    opacity: 0;
}

.hero-image-overlay {
    opacity: 0;
    transition: opacity 0.6s ease;
}

.hero-image-wrapper:hover .hero-image-overlay {
    opacity: 1;
}

@keyframes heroFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroImageIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Buttons */
.btn-primary {
    background: #B85446;
    color: #FDF9F5;
    padding: 14px 28px;
    border-radius: 2px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1.5px solid #B85446;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #A14235;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.btn-primary:hover::before {
    transform: translateX(0);
}

.btn-primary span,
.btn-primary svg {
    position: relative;
    z-index: 1;
}

.btn-primary:hover {
    box-shadow: 0 8px 24px rgba(184, 84, 70, 0.25);
}

.btn-secondary {
    padding: 14px 28px;
    border-radius: 2px;
    border: 1.5px solid #B4C3D0;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: #B85446;
    color: #B85446;
}

/* ========================================
   Section Labels
   ======================================== */
.section-label {
    letter-spacing: 0.2em;
}

/* ========================================
   Service Cards
   ======================================== */
.service-card {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.service-icon {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ========================================
   About Section
   ======================================== */
.about-image {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.about-image-wrapper:hover .about-image {
    transform: scale(1.02);
}

/* ========================================
   Approach Steps
   ======================================== */
.approach-step {
    position: relative;
}

.approach-step::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #B85446, #E2AD82);
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.approach-step:hover::after {
    width: 100%;
}

.approach-step:hover .approach-number {
    color: rgba(180, 84, 70, 0.15);
    transition: color 0.4s ease;
}

/* ========================================
   Form Inputs
   ======================================== */
.form-input,
.form-select,
.form-textarea {
    background: #FDF9F5;
    border: 1px solid #E2E8F0;
    border-radius: 2px;
    padding: 12px 14px;
    outline: none;
    transition: all 0.25s ease;
    width: 100%;
    box-sizing: border-box;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: #B85446;
    box-shadow: 0 0 0 3px rgba(184, 84, 70, 0.08);
    background: #fff;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #B4C3D0;
}

.form-select {
    appearance: none;
    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='%239FB3C8' 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 12px center;
    padding-right: 36px;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

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

.reveal.visible {
    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; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .about-image-wrapper {
        margin-bottom: 2rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .hero-title {
        font-size: 3.5rem;
    }
}

/* ========================================
   Print
   ======================================== */
@media print {
    #navbar, #menuBtn, #mobileMenu { display: none; }
    body { background: white; }
    .hero-image { display: none; }
}
