/* ========================================
   Watts Electrical Contractor - Custom Styles
   ======================================== */

/* Custom Properties */
:root {
    --color-terracotta: #C2785A;
    --color-terracotta-light: #D4956F;
    --color-terracotta-dark: #A86248;
    --color-surface: #1A1D23;
    --color-surface-light: #2A2D35;
    --color-sand: #E8D5C4;
    --color-sand-light: #F5EDE5;
    --color-sand-dark: #D4C0AE;
    --color-white: #FFFFFF;
    --color-text: #1A1D23;
    
    --font-body: 'Outfit', sans-serif;
    --font-heading: 'Playfair Display', serif;
    
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    
    --shadow-sm: 0 1px 3px rgba(26, 29, 35, 0.08);
    --shadow-md: 0 4px 12px rgba(26, 29, 35, 0.1);
    --shadow-lg: 0 8px 30px rgba(26, 29, 35, 0.12);
    --shadow-xl: 0 16px 50px rgba(26, 29, 35, 0.15);
}

/* Base Styles */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
.font-playfair {
    font-family: var(--font-heading);
}

.font-outfit {
    font-family: var(--font-body);
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(135deg, var(--color-terracotta) 0%, var(--color-terracotta-dark) 100%);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-terracotta-light) 0%, var(--color-terracotta) 100%);
    transition: left 0.3s ease;
    z-index: 0;
}

.btn-primary:hover::before {
    left: 0;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
}

.btn-secondary {
    border: 2px solid var(--color-surface);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--color-surface);
    color: var(--color-white);
    transform: translateY(-2px);
}

/* Navigation */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-terracotta);
    transition: width 0.3s ease;
}

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

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

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

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.animate-slide-up {
    animation: slideUp 0.8s ease forwards;
    opacity: 0;
}

.animation-delay-200 {
    animation-delay: 0.2s;
}

.animation-delay-400 {
    animation-delay: 0.4s;
}

.animation-delay-600 {
    animation-delay: 0.6s;
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Navbar Scroll State */
.navbar-scrolled {
    box-shadow: var(--shadow-md);
}

.navbar-scrolled .bg-white\/95 {
    background: rgba(255, 255, 255, 0.98) !important;
}

/* Mobile Menu */
#mobile-menu {
    max-height: 0;
}

#mobile-menu.open {
    max-height: 400px;
}

/* Back to Top */
#back-to-top {
    transition: all 0.3s ease;
}

#back-to-top.visible {
    opacity: 1;
    pointer-events: all;
}

#back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(194, 120, 90, 0.4);
}

/* Form Styles */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(194, 120, 90, 0.15);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-sand-light);
}

::-webkit-scrollbar-thumb {
    background: var(--color-terracotta);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-terracotta-dark);
}

/* Selection */
::selection {
    background: var(--color-terracotta);
    color: var(--color-white);
}

/* Focus Visible */
*:focus-visible {
    outline: 2px solid var(--color-terracotta);
    outline-offset: 2px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .font-playfair {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }
    
    .service-card {
        padding: 1.5rem;
    }
}

/* Print Styles */
@media print {
    header,
    #back-to-top,
    .btn-primary,
    .btn-secondary {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .bg-surface,
    .bg-terracotta {
        background: #fff !important;
        color: #000 !important;
    }
}
