/* ============================================================
   Poinciana Car Loader
   SUV silhouette: Draw → Start → Drive Off
   ============================================================ */

/* Overlay base is in loaders.css — car uses a cooler background */
#carLoader.loader-overlay { background: #0c0e12; }

/* ===== TAGLINE ===== */
.car-tagline {
  font-family: 'Outfit', sans-serif;
  font-size: 16px; font-weight: 300;
  color: #6b7080; margin-top: 18px; text-align: center;
  opacity: 0; animation: fadeIn 0.8s ease 0.8s forwards;
}
.car-dots { display: inline-flex; gap: 4px; margin-left: 4px; vertical-align: middle; }
.car-dots span { width: 3px; height: 3px; border-radius: 50%; background: #c9a96e; opacity: 0; animation: dotPulse 1.4s ease-in-out infinite; }
.car-dots span:nth-child(1) { animation-delay: 1.2s; }
.car-dots span:nth-child(2) { animation-delay: 1.4s; }
.car-dots span:nth-child(3) { animation-delay: 1.6s; }
@keyframes dotPulse { 0%, 80%, 100% { opacity: 0.15; transform: scale(0.8); } 40% { opacity: 0.8; transform: scale(1.2); } }


/* ============================================================
   CAR — Start Up & Drive Off
   ============================================================ */
.car-svg { width: 160px; height: 90px; overflow: visible; }

/* Road surface */
.c-road { fill: none; stroke: #b8bcc8; stroke-width: 0.3; opacity: 0.2; stroke-dasharray: 300; stroke-dashoffset: 300; animation: traceIn 2s ease 0s forwards; }
.c-road-dash { fill: none; stroke: #6b7080; stroke-width: 0.4; stroke-linecap: round; stroke-dasharray: 4 8; opacity: 0; animation: fadeIn 0.8s ease 0.8s forwards; }

/* Car body — side profile silhouette */
.c-body {
  fill: none; stroke: #b8bcc8; stroke-width: 1; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 400; stroke-dashoffset: 400;
  animation: traceIn 2s cubic-bezier(0.4,0,0.2,1) 0.2s forwards;
}
/* Roof line */
.c-roof {
  fill: none; stroke: #b8bcc8; stroke-width: 0.5; stroke-linecap: round;
  stroke-dasharray: 80; stroke-dashoffset: 80;
  animation: traceIn 1s ease 1.2s forwards;
}
/* Windows */
.c-window {
  fill: none; stroke: #b8bcc8; stroke-width: 0.4; stroke-linejoin: round;
  stroke-dasharray: 60; stroke-dashoffset: 60;
  opacity: 0.6;
}
.c-win1 { animation: traceIn 0.6s ease 1.5s forwards; }
.c-win2 { animation: traceIn 0.6s ease 1.7s forwards; }

/* Wheels */
.c-wheel-outer { fill: none; stroke: #b8bcc8; stroke-width: 0.8; stroke-dasharray: 50; stroke-dashoffset: 50; }
.c-wheel-inner { fill: none; stroke: #c9a96e; stroke-width: 0.5; stroke-dasharray: 30; stroke-dashoffset: 30; }
.c-wh-o1 { animation: traceIn 0.8s ease 1s forwards; }
.c-wh-i1 { animation: traceIn 0.6s ease 1.3s forwards; }
.c-wh-o2 { animation: traceIn 0.8s ease 1.1s forwards; }
.c-wh-i2 { animation: traceIn 0.6s ease 1.4s forwards; }

/* Headlight glow */
.c-headlight {
  fill: #c9a96e; opacity: 0; r: 2;
}
.c-headlight-beam {
  fill: none; stroke: #c9a96e; stroke-width: 0.4; stroke-linecap: round;
  opacity: 0;
}

/* Taillight */
.c-taillight { fill: #a8443a; opacity: 0; }

/* START-UP SEQUENCE: headlights flash on, engine "rumble" */
.c-headlight { animation: lightsOn 0.3s ease 2.2s forwards; }
.c-headlight-beam { animation: beamOn 0.5s ease 2.3s forwards; }
.c-taillight { animation: lightsOn 0.3s ease 2.2s forwards; }

@keyframes lightsOn {
  0% { opacity: 0; }
  50% { opacity: 1; }
  70% { opacity: 0.4; }
  100% { opacity: 0.9; }
}
@keyframes beamOn {
  0% { opacity: 0; stroke-dasharray: 0 40; }
  100% { opacity: 0.6; stroke-dasharray: 40 0; }
}

/* Engine start: subtle body vibration */
.c-car-group {
  animation: engineStart 0.4s ease 2.1s 3, carDrive 1.5s cubic-bezier(0.4,0,1,1) 3.5s forwards;
}
@keyframes engineStart {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(0.3px, -0.3px); }
  50% { transform: translate(-0.3px, 0.2px); }
  75% { transform: translate(0.2px, -0.2px); }
}

/* DRIVE OFF: car accelerates to the right and exits */
@keyframes carDrive {
  0% { transform: translateX(0); opacity: 1; }
  60% { opacity: 1; }
  100% { transform: translateX(180px); opacity: 0; }
}

/* Wheel spin during drive */
.c-wheel-spin {
  animation: wheelSpin 0.3s linear 3.5s infinite;
}
@keyframes wheelSpin {
  to { transform: rotate(360deg); }
}
.c-wh-spin1 { transform-origin: 48px 62px; }
.c-wh-spin2 { transform-origin: 108px 62px; }

/* Road lines stream backwards when car drives */
.c-road-stream {
  animation: roadStream 1.5s linear 3.5s forwards;
}
@keyframes roadStream {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -200; }
}

/* Exhaust puffs appear as car drives */
.c-exhaust { fill: #b8bcc8; opacity: 0; }
.c-exhaust:nth-of-type(1) { animation: puff 0.6s ease 3.6s forwards; }
.c-exhaust:nth-of-type(2) { animation: puff 0.6s ease 3.9s forwards; }
.c-exhaust:nth-of-type(3) { animation: puff 0.6s ease 4.2s forwards; }
@keyframes puff {
  0% { opacity: 0.4; r: 1.5; transform: translate(0, 0); }
  100% { opacity: 0; r: 4; transform: translate(-12px, -4px); }
}
