/* ============================================
   THOMAS CLEANERS — Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #f0f4f8;
}
::-webkit-scrollbar-thumb {
    background: #9fb3c8;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #627d98;
}

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

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

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

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(16, 42, 67, 0.06);
}

/* --- Mobile Menu --- */
.menu-line {
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

#menuBtn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
}

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

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

.mobile-menu-open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-link:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-link:nth-child(3) { transition-delay: 0.3s; }
.mobile-menu-open .mobile-link:nth-child(4) { transition-delay: 0.4s; }
.mobile-menu-open .mobile-link:nth-child(5) { transition-delay: 0.5s; }

/* --- Hero --- */
.clip-hero-right {
    clip-path: polygon(30% 0, 100% 0, 100% 100%, 0% 100%);
}

.hero-tag {
    animation: fadeUp 0.8s ease forwards;
}

.hero-headline {
    animation: fadeUp 0.8s ease 0.15s forwards;
    opacity: 0;
}

.hero-desc {
    animation: fadeUp 0.8s ease 0.3s forwards;
    opacity: 0;
}

.hero-image-wrapper {
    animation: fadeIn 1s ease 0.4s forwards;
    opacity: 0;
}

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

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

/* Floating card animation */
.floating-card {
    animation: float 4s ease-in-out infinite;
}

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

/* Scroll line animation */
.scroll-line {
    animation: scrollPulse 2s ease-in-out infinite;
}

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

/* --- Buttons --- */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

/* --- Section Styles --- */
.section-tag {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-title {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease 0.1s, transform 0.6s ease 0.1s;
}

.section-title.visible,
.section-tag.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Service Cards --- */
.service-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.service-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- About Images --- */
.about-image-grid {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.about-image-grid.visible {
    opacity: 1;
    transform: translateX(0);
}

/* --- Process Steps --- */
.process-step {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.process-step.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Form Inputs --- */
.form-input {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
    border-color: #d49a2a !important;
    box-shadow: 0 0 0 3px rgba(212, 154, 42, 0.1);
}

.form-input::placeholder {
    color: #bcccdc;
}

/* --- Stat Items --- */
.stat-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.stat-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- General Reveal Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* --- Prefers 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;
    }
    
    .hero-tag,
    .hero-headline,
    .hero-desc,
    .hero-image-wrapper {
        opacity: 1;
        animation: none;
    }
    
    .reveal,
    .service-card,
    .process-step,
    .stat-item,
    .section-tag,
    .section-title,
    .about-image-grid {
        opacity: 1;
        transform: none;
        animation: none;
    }
    
    .floating-card {
        animation: none;
    }
    
    .scroll-line {
        animation: none;
        opacity: 0.5;
    }
}

/* --- Responsive --- */
@media (max-width: 767px) {
    .clip-hero-right {
        clip-path: none;
        display: none;
    }
    
    .hero-headline {
        font-size: 2.5rem !important;
    }
    
    .hero-image-wrapper img {
        height: 350px !important;
    }
    
    .floating-card {
        position: relative;
        top: auto !important;
        left: auto !important;
        margin-top: 16px;
    }
    
    .about-img-accent {
        display: none;
    }
    
    .about-img-main img {
        height: 300px !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .hero-headline {
        font-size: 3.5rem !important;
    }
}
