/* ============================================
   Foundation Recovery Center — Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: #c45a2e;
    color: white;
}

/* ============================================
   Navigation
   ============================================ */
#navbar {
    background: rgba(250, 248, 245, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

#navbar.scrolled {
    background: rgba(250, 248, 245, 0.98);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

.nav-link {
    position: relative;
}

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

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

/* Mobile Menu */
#mobileMenu {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.mobile-link {
    position: relative;
}

.menu-line {
    display: block;
    transition: all 0.3s ease;
}

body.menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

body.menu-open .menu-line:nth-child(2) {
    transform: rotate(-45deg) translate(3px, -3px);
}

/* ============================================
   Hero Animations
   ============================================ */
.hero-tagline {
    animation: slideDown 0.8s ease forwards;
}

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

.hero-subheadline {
    animation: fadeIn 0.8s ease 0.4s forwards;
    opacity: 0;
}

@keyframes slideDown {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Scroll Reveal
   ============================================ */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.reveal[data-delay="100"] { transition-delay: 0.1s; }
.reveal[data-delay="200"] { transition-delay: 0.2s; }
.reveal[data-delay="300"] { transition-delay: 0.3s; }
.reveal[data-delay="400"] { transition-delay: 0.4s; }

/* ============================================
   Service Cards
   ============================================ */
.service-card {
    transition: background-color 0.5s ease;
}

.service-card:hover h3 {
    transform: translateX(4px);
    transition: transform 0.3s ease;
}

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

.approach-step::after {
    content: '';
    position: absolute;
    top: 24px;
    right: -16px;
    width: 32px;
    height: 1px;
    background-color: #ddbfa0;
}

@media (max-width: 1023px) {
    .approach-step::after {
        display: none;
    }
}

/* ============================================
   Form Styles
   ============================================ */
input:focus,
textarea:focus {
    outline: none;
    border-color: #c45a2e !important;
    box-shadow: 0 0 0 3px rgba(196, 90, 46, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: #d4cfc8;
}

/* ============================================
   Button Hover Effects
   ============================================ */
button, 
a[href^="tel"] {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* ============================================
   Smooth Scroll Offset for Fixed Nav
   ============================================ */
section[id] {
    scroll-margin-top: 80px;
}

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

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 767px) {
    .hero-headline {
        font-size: 2.75rem !important;
    }
    
    .floating-card {
        position: relative;
        top: auto !important;
        left: auto !important;
        margin-top: 1rem;
    }
}

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

/* ============================================
   Print Styles
   ============================================ */
@media print {
    #navbar,
    #mobileMenu {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    section {
        page-break-inside: avoid;
    }
}
