/* ========================================
   Pfeiffer Carpentry — Custom Styles
   ======================================== */

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(13, 148, 136, 0.2);
    color: #0f766e;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* --- Navbar --- */
#navbar {
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

#navbar.scrolled .nav-link {
    color: rgba(30, 41, 59, 0.8);
}

#navbar.scrolled .nav-link:hover {
    color: #0d9488;
}

#navbar.scrolled .btn-primary {
    background: #0d9488;
    color: white;
}

#navbar.scrolled .btn-primary:hover {
    background: #0f766e;
}

#navbar.scrolled .w-9 {
    background: #0d9488;
}

#navbar.scrolled .font-serif {
    color: #1e293b;
}

/* --- Buttons --- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    background: #0d9488;
    color: white;
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(13, 148, 136, 0.3);
}

.btn-primary:hover {
    background: #0f766e;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(13, 148, 136, 0.35);
    color: white;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    color: white;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1rem;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    background: transparent;
    color: #0d9488;
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid #0d9488;
    cursor: pointer;
}

.btn-outline:hover {
    background: #0d9488;
    color: white;
    transform: translateY(-2px);
}

/* --- Section Styles --- */
.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f0fdfa;
    color: #0d9488;
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border: 1px solid #ccfbf1;
}

.section-title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    color: #1e293b;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.15rem;
    color: #64748b;
    line-height: 1.7;
}

.section-tag-light {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(13, 148, 136, 0.15);
    color: #5eead4;
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border: 1px solid rgba(13, 148, 136, 0.3);
}

.section-title-light {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    color: #ffffff;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.section-subtitle-light {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.7;
}

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

.hero-overlay {
    background: linear-gradient(
        135deg,
        rgba(2, 6, 23, 0.82) 0%,
        rgba(4, 47, 46, 0.75) 50%,
        rgba(15, 23, 42, 0.70) 100%
    );
}

/* --- Stats --- */
.stat-card {
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-4px);
}

/* --- Service Cards --- */
.service-card {
    background: white;
    border-radius: 20px;
    padding: 8px;
    transition: all 0.4s ease;
    border: 1px solid #f1f5f9;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.1);
    border-color: transparent;
}

.service-img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --- About --- */
.about-img-main {
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12);
}

.about-img-float {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

/* --- Gallery --- */
.gallery-item {
    position: relative;
    cursor: pointer;
}

.gallery-img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(4, 47, 46, 0.85) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 12px;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-label {
    color: white;
    font-family: 'DM Serif Display', serif;
    font-size: 1.25rem;
    transform: translateY(10px);
    transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-label {
    transform: translateY(0);
}

/* --- Testimonial Cards --- */
.testimonial-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.4s ease;
}

.testimonial-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-6px);
    border-color: rgba(13, 148, 136, 0.3);
}

/* --- Form --- */
.input-field {
    width: 100%;
    padding: 14px 18px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: inherit;
    color: #1e293b;
    background: white;
    transition: all 0.3s ease;
    outline: none;
}

.input-field:hover {
    border-color: #94a3b8;
}

.input-field:focus {
    border-color: #0d9488;
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.1);
}

.input-field::placeholder {
    color: #94a3b8;
}

/* --- Mobile Menu --- */
.mobile-nav-link {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

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

/* --- Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* --- Hero animations (visible on load) --- */
.hero-content {
    animation: heroFadeIn 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.hero-stats {
    animation: heroFadeIn 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.4s forwards;
    opacity: 0;
}

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

/* --- 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;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .about-img-float {
        position: relative;
        margin-top: 1rem;
    }
    
    .stat-card {
        text-align: center;
    }
}
