/* ==========================================
   Auto Tronic Services — Custom Styles
   Premium Dark Luxury Theme
   ========================================== */

/* Color Tokens */
:root {
    --terracotta: #C8956C;
    --terracotta-dark: #B8845C;
    --sand: #D4B896;
    --bg-primary: #0D0D0D;
    --bg-secondary: #141414;
    --bg-tertiary: #1A1A1A;
    --text-primary: #FFFFFF;
    --text-secondary: #E5E5E5;
    --text-muted: #6B7280;
    --text-dark: #4B5563;
}

/* Tailwind Config Extension */
@tailwind base;
@tailwind components;
@tailwind utilities;

@layer theme {
    :root {
        --color-terracotta: #C8956C;
        --color-terracotta-dark: #B8845C;
    }
}

@layer utilities {
    .text-terracotta { color: #C8956C; }
    .bg-terracotta { background-color: #C8956C; }
    .hover\\:bg-terracotta:hover { background-color: #C8956C; }
    .hover\\:text-terracotta:hover { color: #C8956C; }
    .border-terracotta { border-color: #C8956C; }
    .border-terracotta\\/30 { border-color: rgba(200, 149, 108, 0.3); }
    .border-terracotta\\/40 { border-color: rgba(200, 149, 108, 0.4); }
    .bg-terracotta\\/5 { background-color: rgba(200, 149, 108, 0.05); }
    .bg-terracotta\\/10 { background-color: rgba(200, 149, 108, 0.1); }
    .bg-terracotta\\/20 { background-color: rgba(200, 149, 108, 0.2); }
}

/* Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: #0D0D0D;
    color: #E5E5E5;
    overflow-x: hidden;
}

.font-playfair {
    font-family: 'Playfair Display', serif;
}

.font-inter {
    font-family: 'Inter', sans-serif;
}

/* Selection */
::selection {
    background-color: rgba(200, 149, 108, 0.3);
    color: #FFFFFF;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0D0D0D;
}
::-webkit-scrollbar-thumb {
    background: rgba(200, 149, 108, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(200, 149, 108, 0.5);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* Reveal on Scroll */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

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

/* Default state for reduced motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(25px);
        transition: opacity 0.7s ease-out, transform 0.7s ease-out;
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar */
#navbar {
    background: transparent;
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background: rgba(13, 13, 13, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Mobile Menu */
#mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

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

#mobile-menu.active .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.active .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.active .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.active .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobile-menu.active .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Menu Lines Animation */
.menu-line {
    display: block;
    transition: all 0.3s ease;
}

#mobile-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#mobile-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: translateX(10px);
}
#mobile-toggle.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Hover effects for service cards */
.group:hover .group-hover\:text-terracotta {
    color: #C8956C;
}

/* Button focus states */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #C8956C;
    outline-offset: 2px;
}

/* Image lazy loading fade */
img {
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Map dark theme override */
iframe[src*="google.com/maps"] {
    background: #1a1a1a;
}

/* Print styles */
@media print {
    #navbar, #mobile-menu { display: none; }
    body { background: white; color: black; }
}
