/* ============================================================
   Arifin Jaya Motor - Custom Styles (pelengkap Tailwind)
   ============================================================ */

:root {
  --ajm-orange: #f59e0b;
  --ajm-dark: #0f172a;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: #f59e0b;
  color: #0f172a;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #0f172a;
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: #f59e0b;
}

/* --- Grid pattern untuk hero --- */
.hero-grid {
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.09) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, #000 40%, transparent 100%);
  mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, #000 40%, transparent 100%);
}

/* --- Animasi reveal saat scroll --- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.24s; }
.reveal-delay-3 { transition-delay: 0.36s; }

/* --- Before/After Comparison Slider --- */
.ba-wrap {
  position: relative;
  overflow: hidden;
  cursor: col-resize;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.ba-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  -moz-user-select: none;
}
.ba-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.ba-layer img {
  max-width: none;
  height: 100%;
  object-fit: cover;
}
.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: #fbbf24;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.35), 0 0 14px rgba(0,0,0,0.45);
  z-index: 10;
  transform: translateX(-50%);
  transition: background 0.2s;
}
.ba-handle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  background: #fbbf24;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4);
}
.ba-handle::before {
  content: '⇄';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  color: #0f172a;
  font-size: 18px;
  font-weight: 800;
  line-height: 44px;
}
.ba-label {
  position: absolute;
  top: 12px;
  z-index: 5;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 9999px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.ba-label.before { left: 12px; background: rgba(15,23,42,0.82); color: #e2e8f0; }
.ba-label.after  { right: 12px; background: #fbbf24; color: #0f172a; }

/* --- Lightbox --- */
#lightbox {
  display: none;
}
#lightbox.open {
  display: flex;
}

/* --- Kartu layanan hover --- */
.service-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -18px rgba(245, 158, 11, 0.35);
}

/* --- Navigasi aktif --- */
.nav-link.active {
  color: #fbbf24;
}

/* --- Form admin --- */
.form-input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  padding: 0.6rem 0.9rem;
  font-size: 0.9rem;
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}
.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.35rem;
}

/* --- Animasi badge / blob --- */
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
.floaty { animation: floaty 6s ease-in-out infinite; }

@keyframes spin-slow {
  to { transform: rotate(360deg); }
}
.spin-slow { animation: spin-slow 22s linear infinite; }
