/* Hero background — clean truck-only crop, no baked-in text */
.hero-bg {
  background-image: url('/assets/truck-hero.jpg');
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  background-color: #0A1B3E;
  filter: saturate(1.08) contrast(1.05);
}
@media (max-width: 640px) {
  .hero-bg {
    background-position: 75% center;
  }
}

.hero-overlay {
  background:
    /* Subtle vignette top + bottom for depth */
    linear-gradient(180deg, rgba(10, 27, 62, 0.35) 0%, rgba(10, 27, 62, 0) 18%, rgba(10, 27, 62, 0) 80%, rgba(10, 27, 62, 0.55) 100%),
    /* Left navy panel — keeps hero text crisply legible */
    linear-gradient(95deg, rgba(10, 27, 62, 0.96) 0%, rgba(15, 40, 88, 0.86) 28%, rgba(15, 40, 88, 0.45) 55%, rgba(15, 40, 88, 0.10) 80%, rgba(15, 40, 88, 0) 100%);
}
@media (max-width: 640px) {
  .hero-overlay {
    background:
      linear-gradient(180deg, rgba(10, 27, 62, 0.85) 0%, rgba(15, 40, 88, 0.55) 35%, rgba(15, 40, 88, 0.88) 100%);
  }
}

/* Form inputs — consistent design across browsers */
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #ffffff;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 500;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  appearance: none;
  -webkit-appearance: none;
}
.form-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}
.form-input:hover {
  border-color: #cbd5e1;
}
.form-input:focus {
  outline: none;
  border-color: #0F2858;
  box-shadow: 0 0 0 4px rgba(15, 40, 88, 0.1);
  background: #ffffff;
}
.form-input.is-invalid {
  border-color: #DC2030;
  background: #fef2f2;
}
.form-input.is-invalid:focus {
  box-shadow: 0 0 0 4px rgba(220, 32, 48, 0.12);
}

/* Native select chevron */
select.form-input {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%230F2858' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.75rem;
}

/* Date/time inputs — make Webkit's calendar/clock icon use brand color */
input[type="date"].form-input::-webkit-calendar-picker-indicator,
input[type="time"].form-input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.6;
  filter: invert(13%) sepia(45%) saturate(2000%) hue-rotate(205deg);
}
input[type="date"].form-input::-webkit-calendar-picker-indicator:hover,
input[type="time"].form-input::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

/* Error message lines */
.error {
  display: none;
  margin-top: 0.375rem;
  color: #DC2030;
  font-size: 0.8125rem;
  font-weight: 500;
}
.error.show {
  display: block;
}

/* CDL pill radio group */
.cdl-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 0.5rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 0.75rem;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  color: #475569;
  background: #ffffff;
  text-align: center;
  transition: all 0.15s;
  user-select: none;
}
.cdl-pill:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}
.cdl-pill:has(input:checked) {
  background: #0F2858;
  color: #ffffff;
  border-color: #0F2858;
  box-shadow: 0 4px 12px rgba(15, 40, 88, 0.25);
}

/* Form-level status banner */
#formStatus.show { display: block; }
#formStatus.error-banner {
  padding: 1rem;
  border-radius: 0.75rem;
  background: #fef2f2;
  border: 1.5px solid #fecaca;
  color: #991b1b;
  font-weight: 500;
  font-size: 0.875rem;
}

/* Success modal entrance */
#successModal:not(.hidden) {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}
#successModal:not(.hidden) > div {
  animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes popIn {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Smooth scroll behavior for anchor nav */
html {
  scroll-behavior: smooth;
}

/* Larger touch targets on mobile */
@media (max-width: 640px) {
  .form-input {
    padding: 0.875rem 1rem;
    font-size: 16px; /* prevents iOS zoom on focus */
  }
  .cdl-pill {
    padding: 0.875rem 0.5rem;
    font-size: 0.875rem;
  }
}

/* Logo recoloring — make the navy text white when over dark backgrounds */
.logo-on-dark {
  filter: brightness(0) invert(1) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}

/* Tap highlight removal */
button, a, label {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
