/* ========================================
   JT Home Renovations - Custom Styles
   ======================================== */

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

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

body {
    min-height: 100vh;
}

/* Selection */
::selection {
    background: #8a2020;
    color: #fff;
}

/* ========================================
   Navigation
   ======================================== */
.nav {
    background: rgba(254, 252, 246, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(138, 32, 32, 0.08);
}

.nav.scrolled {
    background: rgba(254, 252, 246, 0.98);
    box-shadow: 0 4px 30px rgba(138, 32, 32, 0.08);
}

.nav-link {
    position: relative;
}

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

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

/* ========================================
   Mobile Menu
   ======================================== */
.mobile-menu {
    z-index: 50;
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu-link {
    position: relative;
}

.mobile-menu-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #8a2020;
    transition: width 0.3s ease;
}

.mobile-menu-link:hover::after {
    width: 80%;
}

/* ========================================
   Buttons
   ======================================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #8a2020;
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 1rem;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid #8a2020;
    cursor: pointer;
}

.btn-primary:hover {
    background: #711a1a;
    border-color: #711a1a;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(138, 32, 32, 0.3);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: #8a2020;
    padding: 1rem 2rem;
    border-radius: 1rem;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid #8a2020;
    cursor: pointer;
}

.btn-outline:hover {
    background: #8a2020;
    color: #fff;
    transform: translateY(-2px);
}

.btn-light {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    color: #8a2020;
    padding: 1rem 2rem;
    border-radius: 1rem;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid #fff;
    cursor: pointer;
}

.btn-light:hover {
    background: transparent;
    color: #fff;
    border-color: #fff;
    transform: translateY(-2px);
}

.btn-outline-light {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 1rem;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.4);
    cursor: pointer;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    transform: translateY(-2px);
}

/* ========================================
   Section Labels
   ======================================== */
.section-label {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #8a2020;
    background: rgba(138, 32, 32, 0.08);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    background: #fefcf6;
    position: relative;
}

.hero-shape-1 {
    animation: float1 8s ease-in-out infinite;
}

.hero-shape-2 {
    animation: float2 10s ease-in-out infinite;
}

.hero-shape-3 {
    animation: float3 12s ease-in-out infinite;
}

.hero-shape-4 {
    animation: float1 6s ease-in-out infinite reverse;
}

.hero-shape-5 {
    animation: float2 7s ease-in-out infinite reverse;
}

@keyframes float1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(20px, -20px) rotate(5deg); }
    66% { transform: translate(-10px, 15px) rotate(-3deg); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-15px, 20px) scale(1.05); }
}

@keyframes float3 {
    0%, 100% { transform: translate(0, 0) rotate(45deg); }
    50% { transform: translate(25px, -10px) rotate(50deg); }
}

.hero-image-wrapper {
    position: relative;
}

.hero-float-card {
    animation: floatCard 4s ease-in-out infinite;
}

@keyframes floatCard {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero-deco {
    animation: float2 5s ease-in-out infinite;
}

.hero-deco2 {
    animation: float1 6s ease-in-out infinite;
}

.hero-stat {
    position: relative;
}

.hero-stat:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -1.5rem;
    top: 20%;
    height: 60%;
    width: 1px;
    background: #d4c8bc;
}

/* Scroll indicator */
.scroll-line {
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, #8a2020, transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 1; transform: scaleY(1); }
    50% { opacity: 0.5; transform: scaleY(0.6); }
}

/* ========================================
   Service Cards
   ======================================== */
.service-card {
    opacity: 1;
}

/* ========================================
   Process Cards
   ======================================== */
.process-card {
    opacity: 1;
}

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

/* ========================================
   Testimonial Cards
   ======================================== */
.testimonial-card {
    opacity: 1;
}

/* ========================================
   Contact Form
   ======================================== */
.input-field {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e8e0d8;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-family: inherit;
    color: #2a2018;
    background: #fefcf6;
    transition: all 0.3s ease;
    outline: none;
}

.input-field:focus {
    border-color: #8a2020;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(138, 32, 32, 0.1);
}

.input-field::placeholder {
    color: #b0a090;
}

.success-message {
    animation: fadeInUp 0.5s ease;
}

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

/* ========================================
   Scroll Reveal Animations
   (Progressive enhancement - content visible without JS)
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Default state: content is visible */
    .reveal {
        transform: translateY(0);
    }
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 768px) {
    .hero {
        padding-top: 6rem;
    }
    
    .hero h1 {
        font-size: 2.5rem !important;
    }
    
    .hero-image-wrapper {
        margin-top: 3rem;
    }
    
    .hero-float-card {
        position: relative;
        bottom: auto;
        left: auto;
        margin-top: 1rem;
    }
    
    .hero-stat:not(:last-child)::after {
        display: none;
    }
    
    .about-image-grid {
        gap: 0.5rem !important;
    }
    
    .process-card:not(:last-child) {
        margin-bottom: 1rem;
    }
    
    .process-card:not(:last-child)::after {
        display: none;
    }
}

@media (max-width: 640px) {
    .hero h1 {
        font-size: 2rem !important;
    }
    
    .section-label {
        font-size: 0.75rem;
    }
}

/* ========================================
   Focus Styles (Accessibility)
   ======================================== */
:focus-visible {
    outline: 3px solid #8a2020;
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
    outline: 3px solid #8a2020;
    outline-offset: 2px;
    border-radius: 0.5rem;
}
