/* =====================================================
   Thomas Roadlines — Custom styles
   Handles: glassmorphism nav, hover effects, SVG path draws,
   scroll reveal transitions, floating accents, keyframes.
   (Tailwind handles the utility layout.)
   ===================================================== */

html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 96px; }

/* ============ Hero grid backdrop ============ */
.bg-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: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 40%, transparent 80%);
          mask-image: radial-gradient(ellipse at center, #000 40%, transparent 80%);
}

/* ============ Glassmorphism nav ============ */
.nav-shell {
  background: rgba(0, 0, 0, 0.15);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
          backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  color: #fff;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
#navbar.scrolled .nav-shell {
  background: rgba(139, 23, 27, 0.98); /* Deep Brand Red */
  border-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.2);
}

/* Nav link underline on hover */
.nav-link {
  position: relative;
  padding: 6px 2px;
  color: inherit;
  transition: color 0.2s;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 2px;
  width: 0;
  background: #A31E22;
  transition: width 0.25s ease;
}
.nav-link:hover::after { width: 100%; }

/* Hamburger color follows shell */
.nav-toggle-btn { color: inherit; }

/* ============ Mission / Vision cards ============ */
.mv-card {
  position: relative;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 22px;
  padding: 2rem;
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.mv-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(163, 30, 34, 0.0), rgba(163, 30, 34, 0.07));
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.mv-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.18);
  border-color: rgba(163, 30, 34, 0.25);
}
.mv-card:hover::before { opacity: 1; }
.mv-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, #A31E22, #7A1518);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 14px 30px -10px rgba(163, 30, 34, 0.55);
}

/* ============ Service cards ============ */
.service-card {
  position: relative;
  background: #fff;
  border-radius: 22px;
  padding: 2rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.service-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #A31E22, #C42A2F);
  transition: width 0.4s ease;
}
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 35px 60px -25px rgba(0, 0, 0, 0.22);
}
.service-card:hover::after { width: 100%; }
.service-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: linear-gradient(135deg, #333333, #1a1a1a);
  color: #fff;
  display: grid;
  place-items: center;
  transition: background 0.35s ease, transform 0.35s ease;
}
.service-card:hover .service-icon {
  background: linear-gradient(135deg, #A31E22, #7A1518);
  transform: rotate(-6deg) scale(1.06);
}
.service-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 1.5rem;
  font-weight: 600;
  color: #A31E22;
  opacity: 0.8;
  transition: gap 0.25s ease, opacity 0.25s ease;
}
.service-card:hover .service-arrow {
  gap: 12px;
  opacity: 1;
}

/* ============ Form ============ */
.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #555;
  margin-bottom: 8px;
}
.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  background: #f9fafb;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: #1a1a1a;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.form-input::placeholder { color: #9ca3af; }
.form-input:focus {
  outline: none;
  border-color: #A31E22;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(163, 30, 34, 0.12);
}

/* ============ Check bullets ============ */
.check {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #A31E22;
  color: #fff;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  margin-top: 2px;
}

/* ============ Scroll reveal ============ */
[data-reveal] {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1), transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
[data-reveal].in {
  opacity: 1;
  transform: translateY(0);
}

/* ============ SVG route drawing ============ */
.route-path {
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: dashDraw 2.8s ease forwards 0.5s;
}
.track-anim {
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: dashDraw 3.4s ease forwards;
  filter: drop-shadow(0 0 10px rgba(163, 30, 34, 0.4));
}
@keyframes dashDraw {
  to { stroke-dashoffset: 0; }
}

/* ============ Truck movement along route ============ */
.truck-move {
  offset-path: path("M30 300 Q120 220 200 250 T360 180 T470 80");
  offset-rotate: auto;
  animation: truckMove 8s ease-in-out infinite alternate;
}
@keyframes truckMove {
  from { offset-distance: 0%; }
  to   { offset-distance: 100%; }
}

/* ============ Pulsing waypoint dots ============ */
.pulse-dot {
  transform-origin: center;
  transform-box: fill-box;
  animation: pulseGrow 2.2s ease-out infinite;
}
.pulse-dot:nth-of-type(2) { animation-delay: 1.1s; }
@keyframes pulseGrow {
  0%   { transform: scale(1);   opacity: 0.5; }
  70%  { transform: scale(2.4); opacity: 0; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* ============ Floating accent ============ */
.float-anim { animation: floatY 6s ease-in-out infinite; }
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}

/* ============ Gradient flow accent ============ */
@keyframes gradientFlow {
  0%   { background-position:   0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position:   0% 50%; }
}

/* ============ Reduced-motion safety ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .truck-move, .pulse-dot, .float-anim { animation: none !important; }
}

/* ============ Floating Actions ============ */
.float-actions {
  position: fixed;
  bottom: 80px; /* Leave space for mobile quick bar */
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 50;
}

@media (min-width: 768px) {
  .float-actions {
    bottom: 30px;
    right: 30px;
  }
}

.float-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, opacity 0.3s ease;
  cursor: pointer;
  border: none;
  outline: none;
}

.float-btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

.float-btn--wa {
  background: #25D366; /* WhatsApp Green */
}

.float-btn--wa:hover {
  background: #20BA56;
}

.float-btn--top {
  background: #1a1a1a;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  display: grid;
  place-items: center;
}

.float-btn--top.visible {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

/* Footer Address Slider */
.address-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
  pointer-events: none;
}
.address-slide.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
