/* ==========================================================
   AR-AL Trans — Custom CSS
   Tailwind v4 handles utilities; this handles:
   - @font-face (GDPR — local fonts)
   - Navbar scroll state
   - Hero display text (clamp sizing)
   - Scroll-reveal animations
   - Image slider
   - Route cards
   - WhatsApp button glow
   - Reduced-motion overrides
   ==========================================================

   FONTS: Download IBM Plex Sans WOFF2 files from
   https://github.com/IBM/plex/releases
   Place in: ar-al-trans/public/assets/fonts/
   Required files:
     IBMPlexSans-Regular.woff2
     IBMPlexSans-Medium.woff2
     IBMPlexSans-SemiBold.woff2
     IBMPlexSans-Bold.woff2
   ========================================================== */

/* --- @font-face --- */
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('../fonts/IBMPlexSans-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('../fonts/IBMPlexSans-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('../fonts/IBMPlexSans-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('../fonts/IBMPlexSans-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --- Base --- */
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  font-size: 18px;
  overflow-x: hidden;
}
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* --- Navbar states --- */
#navbar {
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}
#navbar.navbar-scrolled {
  background: rgba(26, 26, 46, 0.55);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid rgba(37, 99, 235, 0.18);
  box-shadow:
    0 1px 0 rgba(37, 99, 235, 0.12) inset,
    0 4px 32px rgba(0, 0, 0, 0.30),
    0 0 40px rgba(37, 99, 235, 0.08);
}

/* --- Hero display text (Convoy-style huge headline) --- */
.hero-display-text {
  font-size: clamp(5rem, 22vw, 17rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

/* --- Scroll-reveal --- */
.reveal,
.reveal-left,
.reveal-right,
.reveal-scale {
  opacity: 0;
  transition:
    opacity 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.reveal       { transform: translateY(28px); }
.reveal-left  { transform: translateX(-36px); }
.reveal-right { transform: translateX(36px); }
.reveal-scale { transform: scale(0.92); }

.reveal.active,
.reveal-left.active,
.reveal-right.active,
.reveal-scale.active {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.24s; }
.reveal-delay-3 { transition-delay: 0.36s; }
.reveal-delay-4 { transition-delay: 0.48s; }
.reveal-delay-5 { transition-delay: 0.60s; }

/* --- Scroll progress bar --- */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, #F97316 0%, #2563EB 100%);
  z-index: 9999;
  pointer-events: none;
  transition: width 0.08s linear;
}

/* --- Hero entrance (CSS keyframe, plays on load) --- */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-enter-0 { animation: heroFadeUp 0.85s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.05s both; }
.hero-enter-1 { animation: heroFadeUp 0.85s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.30s both; }
.hero-enter-2 { animation: heroFadeUp 0.85s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.55s both; }
.hero-enter-3 { animation: heroFadeUp 0.85s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.80s both; }

/* --- Image Slider (CSS-only infinite scroll) --- */
.slider-wrapper {
  width: 100%;
  overflow: hidden;
  /* Fade edges */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}
.slider-track {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: slider-scroll 28s linear infinite;
}
.slider-track:hover {
  animation-play-state: paused;
}
.slider-item {
  width: 280px;
  height: 185px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}
.slider-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.slider-item:hover .slider-img {
  transform: scale(1.06);
}
@keyframes slider-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* --- Service cards (photo + gradient overlay) --- */
.service-card {
  box-shadow: 0 0 0 1.5px rgba(37,99,235,0.55), 0 4px 24px rgba(0,0,0,0.08);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #F97316 0%, #2563EB 55%, transparent 100%);
  z-index: 10;
}
.service-card:hover {
  box-shadow: 0 0 0 2px rgba(37,99,235,0.9), 0 12px 40px rgba(0,0,0,0.18), 0 0 28px rgba(37,99,235,0.2);
  transform: translateY(-4px);
}

/* --- Route cards --- */
.route-card {
  background: #ffffff;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.route-card:hover {
  border-color: #2563EB;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.12);
  transform: translateY(-2px);
}
.route-flags {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* --- WhatsApp button glow --- */
.whatsapp-btn {
  box-shadow: 0 4px 18px rgba(34, 197, 94, 0.28);
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.whatsapp-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(34, 197, 94, 0.40);
}

/* --- Form input focus --- */
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #E5E7EB;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #1A1A2E;
  background: #F8F9FA;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  font-family: inherit;
}
.form-input::placeholder {
  color: #9CA3AF;
}
.form-input:focus {
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  background: #ffffff;
}
.form-input.error {
  border-color: #EF4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

/* --- Hamburger animation --- */
.hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* --- Scroll indicator --- */
.scroll-indicator {
  animation: bounce-slow 2s ease-in-out infinite;
}
@keyframes bounce-slow {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* --- Footer link hover line --- */
.footer-link {
  position: relative;
}
.footer-link::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.2s ease;
}
.footer-link:hover::after {
  width: 100%;
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .reveal-delay-1,
  .reveal-delay-2,
  .reveal-delay-3,
  .reveal-delay-4,
  .reveal-delay-5 {
    transition-delay: 0s;
  }
  .hero-enter-0,
  .hero-enter-1,
  .hero-enter-2,
  .hero-enter-3 {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .slider-track {
    animation: none;
  }
  .scroll-indicator {
    animation: none;
  }
  html {
    scroll-behavior: auto;
  }
}
