/* ============================================
   Hellraiser Body Works — Custom Styles
   Premium Dark Luxury Auto Repair Site
   ============================================ */

*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

/* Preloader */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #0a0a09;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-logo {
    animation: preloaderPulse 1.2s ease-in-out infinite;
}

@keyframes preloaderPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.preloader-bar {
    width: 120px;
    height: 2px;
    background: #2a2a27;
    border-radius: 999px;
    overflow: hidden;
}

.preloader-progress {
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, #c75b39, #e66a3f);
    border-radius: 999px;
    animation: preloaderSlide 1s ease-in-out infinite;
}

@keyframes preloaderSlide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}

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

.navbar.scrolled {
    background: rgba(10, 10, 9, 0.9);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(212, 212, 207, 0.05);
}

.nav-link {
    position: relative;
}

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

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

/* Hamburger */
.hamburger-line {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: #f5e6d3;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-line.top { top: 9px; }
.hamburger-line.middle { top: 15px; }
.hamburger-line.bottom { top: 21px; }

#mobile-menu-btn.active .hamburger-line.top {
    top: 15px;
    transform: translateX(-50%) rotate(45deg);
}

#mobile-menu-btn.active .hamburger-line.middle {
    opacity: 0;
}

#mobile-menu-btn.active .hamburger-line.bottom {
    top: 15px;
    transform: translateX(-50%) rotate(-45deg);
}

.mobile-nav-link {
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid rgba(212, 212, 207, 0.05);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #c75b39, #e66a3f);
    color: #f5e6d3;
    padding: 12px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(199, 91, 57, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(199, 91, 57, 0.4);
    color: #f5e6d3;
}

.btn-secondary {
    background: rgba(245, 230, 211, 0.08);
    color: #f5e6d3;
    padding: 12px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    border: 1px solid rgba(245, 230, 211, 0.15);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(245, 230, 211, 0.14);
    border-color: rgba(245, 230, 211, 0.25);
    transform: translateY(-2px);
    color: #f5e6d3;
}

.btn-white {
    background: #f5e6d3;
    color: #1a1a18;
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.btn-white:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    color: #1a1a18;
}

.btn-secondary-white {
    background: transparent;
    color: #f5e6d3;
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid rgba(245, 230, 211, 0.4);
    transition: all 0.3s ease;
}

.btn-secondary-white:hover {
    background: rgba(245, 230, 211, 0.1);
    border-color: rgba(245, 230, 211, 0.6);
    transform: translateY(-2px);
    color: #f5e6d3;
}

/* Hero Section */
.hero-section {
    position: relative;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 60% at 50% 40%, rgba(199, 91, 57, 0.35) 0%, rgba(146, 59, 37, 0.2) 40%, transparent 70%),
        radial-gradient(ellipse 60% 50% at 20% 60%, rgba(176, 116, 46, 0.2) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 80% 30%, rgba(228, 107, 74, 0.15) 0%, transparent 50%);
    z-index: 1;
}

.hero-pattern {
    position: absolute;
    inset: 0;
    background-image: url('data:image/svg+xml,%3Csvg width=\'40\' height=\'40\' viewBox=\'0 0 40 40\' xmlns=\'http://www.w3.org/2000/svg\'%3E%3Cg fill=\'%23ffffff\' fill-opacity=\'0.02\' fill-rule=\'evenodd\'%3E%3Cpath d=\'M0 40L40 0H20L0 20M40 40V20L20 40\'/%3E%3C/g%3E%3C/svg%3E');
    z-index: 2;
}

.hero-bg-image {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(10, 10, 9, 0.4) 0%,
        rgba(10, 10, 9, 0.2) 40%,
        rgba(10, 10, 9, 0.5) 80%,
        rgba(10, 10, 9, 0.95) 100%
    );
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    padding-bottom: 80px;
}

.hero-headline {
    text-shadow: 0 2px 40px rgba(0,0,0,0.5);
}

.hero-subtitle {
    text-shadow: 0 1px 10px rgba(0,0,0,0.3);
}

.hero-actions {
    text-shadow: none;
}

/* Particles */
.hero-particles {
    position: absolute;
    inset: 0;
    z-index: 3;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #c75b39;
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat var(--dur) var(--delay) infinite;
}

.particle:nth-child(2n) {
    background: #b0742e;
    width: 3px;
    height: 3px;
}

.particle:nth-child(3n) {
    background: #e4ab4a;
    width: 2px;
    height: 2px;
}

@keyframes particleFloat {
    0% { transform: translateY(0) scale(0); opacity: 0; }
    10% { opacity: 0.8; }
    90% { opacity: 0.3; }
    100% { transform: translateY(-400px) scale(1); opacity: 0; }
}

/* Scroll Indicator */
.scroll-dot {
    animation: scrollDotAnim 2s ease-in-out infinite;
}

@keyframes scrollDotAnim {
    0%, 100% { top: 0; opacity: 1; }
    50% { top: 12px; opacity: 0.3; }
}

/* Stats */
.stat-number {
    text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

/* Section Styles */
.section {
    position: relative;
    overflow: hidden;
}

.section-bg-accent {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 50% 80% at 50% 0%, rgba(199, 91, 57, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.section-label {
    letter-spacing: 0.2em;
}

.section-title {
    text-shadow: 0 2px 30px rgba(0,0,0,0.3);
}

.section-subtitle {
    text-shadow: 0 1px 10px rgba(0,0,0,0.2);
}

/* Service Cards */
.services-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 16px;
}

@media (min-width: 640px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.service-card {
    background: rgba(26, 26, 24, 0.8);
    border: 1px solid rgba(212, 212, 207, 0.06);
    border-radius: 20px;
    padding: 32px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #c75b39, transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.service-card:hover {
    border-color: rgba(199, 91, 57, 0.2);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 0 0 1px rgba(199, 91, 57, 0.1);
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(199, 91, 57, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: all 0.4s ease;
}

.service-card:hover .service-icon {
    background: rgba(199, 91, 57, 0.2);
    transform: scale(1.05);
}

.service-icon svg {
    color: #c75b39;
}

.service-title {
    letter-spacing: -0.01em;
}

.service-desc {
    font-size: 15px;
}

/* About Section */
.about-grid {
    position: relative;
}

.about-img-main {
    box-shadow: 0 32px 80px rgba(0,0,0,0.5);
}

.about-img-accent {
    box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}

.about-experience-badge {
    box-shadow: 0 16px 40px rgba(199, 91, 57, 0.3);
}

/* Why Cards */
.why-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 16px;
}

@media (min-width: 768px) {
    .why-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .why-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.why-card {
    background: rgba(26, 26, 24, 0.8);
    border: 1px solid rgba(212, 212, 207, 0.06);
    border-radius: 20px;
    padding: 32px;
    transition: all 0.4s ease;
}

.why-card:hover {
    border-color: rgba(199, 91, 57, 0.2);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.why-card-title {
    letter-spacing: -0.01em;
}

/* Contact */
.contact-grid {
    position: relative;
}

.contact-info-card {
    transition: all 0.3s ease;
}

.contact-icon svg {
    color: #c75b39;
}

/* Form */
.form-label {
    display: block;
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(10, 10, 9, 0.6);
    border: 1px solid rgba(212, 212, 207, 0.1);
    border-radius: 12px;
    color: #f5e6d3;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
}

.form-input::placeholder {
    color: #5a5a52;
}

.form-input:focus {
    border-color: rgba(199, 91, 57, 0.5);
    background: rgba(10, 10, 9, 0.8);
    box-shadow: 0 0 0 3px rgba(199, 91, 57, 0.1);
}

.form-input:hover:not(:focus) {
    border-color: rgba(212, 212, 207, 0.2);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23828279' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

.form-select option {
    background: #1a1a18;
    color: #f5e6d3;
}

.form-success {
    animation: formSuccessIn 0.4s ease;
}

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

/* Social Links */
.social-link {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(212, 212, 207, 0.06);
    border: 1px solid rgba(212, 212, 207, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #828279;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: rgba(199, 91, 57, 0.15);
    border-color: rgba(199, 91, 57, 0.3);
    color: #c75b39;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(199, 91, 57, 0.9);
    border: none;
    color: #f5e6d3;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 40;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(199, 91, 57, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #c75b39;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(199, 91, 57, 0.4);
}

/* Animations */
[data-animate] {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-animate].animate-in {
    opacity: 1;
    transform: translateY(0);
}

[data-animate="1"] { transition-delay: 0.1s; }
[data-animate="2"] { transition-delay: 0.2s; }
[data-animate="3"] { transition-delay: 0.3s; }
[data-animate="4"] { transition-delay: 0.4s; }
[data-animate="5"] { transition-delay: 0.5s; }
[data-animate="6"] { transition-delay: 0.6s; }

/* Mobile menu animation */
#mobile-menu {
    animation: mobileMenuIn 0.3s ease;
}

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

/* Utility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}
