/* ============================================
   FAJAR RENTAL — Custom Styles
   ============================================ */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---- Selection ---- */
::selection {
    background: #F97316;
    color: white;
}

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

::-webkit-scrollbar-track {
    background: #0F172A;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar-glass {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar-glass.scrolled {
    background: rgba(15, 23, 42, 0.92);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Hamburger animation */
#mobile-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

#mobile-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

#mobile-toggle.active .hamburger-line:nth-child(3) {
    width: 1.5rem;
    transform: rotate(-45deg) translate(4px, -4px);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-grid {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 60px 60px;
}

.hero-letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(40px);
}

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

@keyframes scrollBounce {
    0%, 100% {
        transform: translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateY(12px);
        opacity: 0.3;
    }
}

/* ============================================
   SERVICE CARDS
   ============================================ */
.service-card {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(249, 115, 22, 0.08),
                0 8px 20px rgba(0, 0, 0, 0.3);
}

/* ============================================
   MAP DOTS
   ============================================ */
.map-dot {
    animation: mapPulse 2s ease-in-out infinite;
}

.map-dot:nth-child(2) { animation-delay: 0.3s; }
.map-dot:nth-child(3) { animation-delay: 0.6s; }
.map-dot:nth-child(4) { animation-delay: 0.9s; }
.map-dot:nth-child(5) { animation-delay: 1.2s; }

@keyframes mapPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.5);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(249, 115, 22, 0);
    }
}

/* ============================================
   CTA PULSE
   ============================================ */
.cta-button {
    position: relative;
}

.cta-button::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 0.75rem;
    animation: ctaPulse 2.5s ease-in-out infinite;
}

@keyframes ctaPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.4);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(249, 115, 22, 0);
    }
}

/* ============================================
   FORM STYLES
   ============================================ */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' 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: 48px;
}

input[type="date"] {
    color-scheme: dark;
}

/* ============================================
   FLOATING WA BUTTON
   ============================================ */
#wa-float {
    animation: waFloat 3s ease-in-out infinite;
}

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

/* ============================================
   ANIMATION UTILITY CLASSES
   ============================================ */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ============================================
   RESPONSIVE TWEAKS
   ============================================ */
@media (max-width: 768px) {
    .hero-letter {
        font-size: inherit;
    }
    
    #hero-headline {
        font-size: 2rem;
        line-height: 1.2;
    }
}

@media (max-width: 480px) {
    #hero-headline {
        font-size: 1.6rem;
    }
}

/* ============================================
   LOADING SCREEN (Optional Enhancement)
   ============================================ */
.page-loader {
    position: fixed;
    inset: 0;
    background: #0F172A;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s, visibility 0.5s;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(249, 115, 22, 0.2);
    border-top-color: #F97316;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
