/* ==========================================================================
   NAJIB HONDA MALANG - PROFESSIONAL AUTOMOTIVE DESIGN SYSTEM
   Standard: Senior UI/UX Designer & Senior Website Developer
   Brand Identity: Honda Passion Red (#E51937), Dark Carbon (#0B0F19), Pure Studio White
   Typography: Plus Jakarta Sans (Geometric Humanist Automotive Hierarchy)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,700&display=swap');

:root {
  --honda-red: #e51937;
  --honda-red-dark: #b91328;
  --honda-red-light: #ff2d4e;
  --honda-glow: rgba(229, 25, 55, 0.28);
  --carbon-950: #07090e;
  --carbon-900: #0b0f19;
  --carbon-800: #121826;
  --carbon-700: #1e2638;
  --wa-emerald: #10b981;
  --wa-glow: rgba(16, 185, 129, 0.3);
  --surface-ground: #f8fafc;
  --card-border: rgba(226, 232, 240, 0.85);
  --card-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  --card-shadow-hover: 0 24px 40px -10px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(229, 25, 55, 0.15);
}

/* --------------------------------------------------------------------------
   BASE RESET & TYPOGRAPHY
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--surface-ground);
  color: #0f172a;
  line-height: 1.6;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* Custom Refined Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Hide scrollbar for category tabs on touch devices */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* --------------------------------------------------------------------------
   HERO SECTION & SHOWROOM LIGHTING
   -------------------------------------------------------------------------- */
.hero-video-container {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  background-color: var(--carbon-950);
}

@media (min-width: 768px) {
  .hero-video-container {
    min-height: 580px;
  }
}

.hero-video-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%);
  z-index: 1;
  opacity: 0.32;
  filter: brightness(0.75) contrast(1.15) saturate(1.1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(229, 25, 55, 0.4) 0%, rgba(11, 15, 25, 0.9) 60%, var(--carbon-950) 100%);
  z-index: 2;
}

/* Glassmorphism Cards */
.glass-panel {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.glass-dark {
  background: rgba(11, 15, 25, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* --------------------------------------------------------------------------
   MOTORCYCLE STUDIO STAGE (3D PEDESTAL)
   -------------------------------------------------------------------------- */
.vehicle-stage {
  position: relative;
  background: radial-gradient(ellipse at 50% 65%, rgba(241, 245, 249, 0.95) 0%, rgba(255, 255, 255, 0.98) 75%);
  overflow: hidden;
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
  height: 210px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 10px;
}

@media (max-width: 639px) {
  .vehicle-stage {
    height: 180px;
    padding: 8px 6px;
  }
}

.motor-img-wrapper {
  height: 155px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 10;
}

@media (max-width: 639px) {
  .motor-img-wrapper {
    height: 130px;
  }
}

/* Realistic Studio Shadow Under Vehicle */
.pedestal-shadow {
  position: absolute;
  bottom: 12px;
  left: 10%;
  right: 10%;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(15, 23, 42, 0.25) 0%, rgba(15, 23, 42, 0.04) 60%, transparent 75%);
  filter: blur(4px);
  pointer-events: none;
  z-index: 2;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

/* --------------------------------------------------------------------------
   MOTORCYCLE CARD HOVER & INTERACTIONS (LOCKED PROPORTIONS)
   -------------------------------------------------------------------------- */
.motor-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--card-shadow);
}

.motor-card h3 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.motor-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--card-shadow-hover);
}

.motor-card:hover .pedestal-shadow {
  transform: scale(1.08);
  opacity: 0.85;
}

.motor-img-wrapper img {
  max-height: 100%;
  max-width: 90%;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 14px rgba(15, 23, 42, 0.12));
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.motor-card:hover .motor-img-wrapper img {
  transform: scale(1.05) translateY(-3px);
}

/* --------------------------------------------------------------------------
   TACTILE COLOR SWATCHES WITH HALO
   -------------------------------------------------------------------------- */
.swatch-dot {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  border: 2.5px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease;
  cursor: pointer;
  outline: none;
  touch-action: manipulation;
}

@media (min-width: 640px) {
  .swatch-dot {
    width: 30px;
    height: 30px;
  }
}

.swatch-dot:hover {
  transform: scale(1.18);
  z-index: 10;
}

.swatch-dot:active {
  transform: scale(0.92);
}

.swatch-dot.active {
  transform: scale(1.22);
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4.5px var(--honda-red);
  animation: swatchActivePulse 2.5s infinite ease-in-out;
  z-index: 20;
}

@keyframes swatchActivePulse {
  0%, 100% {
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4.5px var(--honda-red);
  }
  50% {
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 6px rgba(229, 25, 55, 0.65), 0 0 12px rgba(229, 25, 55, 0.35);
  }
}

/* --------------------------------------------------------------------------
   SILKY COLOR SWITCH TRANSITION
   -------------------------------------------------------------------------- */
.motor-img-wrapper img {
  filter: drop-shadow(0 10px 14px rgba(15, 23, 42, 0.12));
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease, filter 0.22s ease;
  will-change: transform, opacity;
}

.motor-img-wrapper img.color-swapping {
  opacity: 0.15;
  transform: scale(0.94);
  filter: blur(2px) drop-shadow(0 2px 4px rgba(15, 23, 42, 0.05));
}

/* --------------------------------------------------------------------------
   BUTTONS & BADGES WITH SHIMMER REFLECTION
   -------------------------------------------------------------------------- */
.btn-primary-red {
  background: linear-gradient(135deg, #e51937 0%, #cc142f 100%);
  color: #ffffff;
  font-weight: 800;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px -2px var(--honda-glow);
}
.btn-primary-red:hover {
  background: linear-gradient(135deg, #f42646 0%, #b91328 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -3px var(--honda-glow);
}

.btn-whatsapp {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-weight: 800;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px -2px var(--wa-glow);
}
.btn-whatsapp:hover {
  background: linear-gradient(135deg, #14c78b 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -3px var(--wa-glow);
}

/* Interactive Variant Selector Buttons */
.variant-btn {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}
.variant-btn:active {
  transform: scale(0.96);
}

/* Shimmer Light Reflection Effect on CTA Buttons */
.shimmer-btn {
  position: relative;
  overflow: hidden;
}
.shimmer-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -70%;
  width: 45%;
  height: 200%;
  background: linear-gradient(
    60deg,
    rgba(255, 255, 255, 0) 15%,
    rgba(255, 255, 255, 0.32) 50%,
    rgba(255, 255, 255, 0) 85%
  );
  transform: rotate(25deg);
  animation: shimmerSweep 4.5s infinite ease-in-out;
  pointer-events: none;
}
@keyframes shimmerSweep {
  0%, 65% {
    left: -70%;
    opacity: 0;
  }
  75% {
    opacity: 1;
  }
  100% {
    left: 170%;
    opacity: 0;
  }
}

/* --------------------------------------------------------------------------
   LIVELY FLOATING & AMBIENT ANIMATIONS
   -------------------------------------------------------------------------- */
/* Hero Floating Badge */
.float-badge {
  animation: floatBadge 3.6s ease-in-out infinite;
}
@keyframes floatBadge {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

/* Multi-Ring Ripple for Floating WhatsApp Button */
.wa-floating-btn {
  position: relative;
  animation: waBreathe 3.2s infinite ease-in-out;
}
.wa-floating-btn::before,
.wa-floating-btn::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 9999px;
  border: 2px solid rgba(16, 185, 129, 0.6);
  animation: waRipple 3s cubic-bezier(0.1, 0.8, 0.3, 1) infinite;
  pointer-events: none;
  z-index: -1;
}
.wa-floating-btn::after {
  animation-delay: 1.5s;
}

/* Pantul (Bouncing Animation) for Mobile Draggable WhatsApp Icon */
.wa-bounce-container {
  animation: waPantul 3s cubic-bezier(0.28, 0.84, 0.42, 1) infinite;
  transform-origin: bottom center;
}

#draggable-wa.is-dragging .wa-bounce-container {
  animation-play-state: paused !important;
  transform: scale(1.08);
}

@keyframes waPantul {
  0%, 100% {
    transform: translateY(0) scale(1, 1);
  }
  14% {
    transform: translateY(-16px) scale(0.95, 1.06);
  }
  28% {
    transform: translateY(0) scale(1.05, 0.95);
  }
  40% {
    transform: translateY(-8px) scale(0.98, 1.02);
  }
  52% {
    transform: translateY(0) scale(1.02, 0.98);
  }
  64% {
    transform: translateY(-3px) scale(1, 1);
  }
  75% {
    transform: translateY(0) scale(1, 1);
  }
}

@keyframes waRipple {
  0% {
    transform: scale(0.9);
    opacity: 0.85;
  }
  100% {
    transform: scale(1.55);
    opacity: 0;
  }
}
@keyframes waBreathe {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
}

/* Staggered Card Entrance Animation */
.card-cascade-in {
  animation: cardCascadeIn 0.42s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--item-idx, 0) * 35ms);
}
@keyframes cardCascadeIn {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Spec Modal Spring Animation */
#spec-modal:not(.hidden) {
  animation: modalFadeIn 0.25s ease-out both;
}
#spec-modal:not(.hidden) #spec-modal-content {
  animation: modalSpringUp 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes modalFadeIn {
  from {
    opacity: 0;
    backdrop-filter: blur(0px);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(16px);
  }
}
@keyframes modalSpringUp {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(24px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* --------------------------------------------------------------------------
   RESPONSIVE UTILITIES & SPACING
   -------------------------------------------------------------------------- */
@media (max-width: 639px) {
  .hero-video-container {
    min-height: 480px;
  }
  .motor-card {
    border-radius: 1.25rem;
  }
  .vehicle-stage {
    min-height: 190px;
  }
}
