@tailwind base;
@tailwind components;
@tailwind utilities;

/* ===== Base Fonts: Sora (body) + Archivo (headings) ===== */
body {
  font-family: 'Sora', system-ui, sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Archivo', system-ui, sans-serif;
}

/* ===== Custom Styles for U SAT & Tyres ===== */
/* Only for things Tailwind utility classes cannot express */


/* === Nav underline hover animation — REMOVED (remediation spec §8).
   The .nav-link::after / :hover::after rules were deleted; the nav relies on
   its colour/opacity hover states only. === */

/* === Marquee for brands on mobile === */
@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.marquee-track {
  animation: marquee 30s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

/* === Scrollbar hide for horizontal scroll containers === */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* === Instagram grid hover overlay === */
.insta-tile .insta-overlay {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.insta-tile:hover .insta-overlay {
  opacity: 1;
}

.insta-tile img {
  transition: transform 0.4s ease;
}

.insta-tile:hover img {
  transform: scale(1.08);
}

/* === Category card hover === */
.cat-card {
  overflow: hidden;
}

.cat-card img {
  transition: transform 0.4s ease;
}

.cat-card:hover img {
  transform: scale(1.05);
}

.cat-card .shop-arrow {
  transition: transform 0.3s ease;
}

.cat-card:hover .shop-arrow {
  transform: translateX(4px);
}

/* === Custom scroll-triggered reveal (used as final state fallback) === */
.reveal {
  opacity: 1;
  transform: none;
}

/* === 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;
  }
}

/* === Focus visible styles === */
*:focus-visible {
  outline: 2px solid #D4A017;
  outline-offset: 2px;
}

/* =============================================
   AREA PAGE — PREMIUM ANIMATION EFFECTS
   ============================================= */

/* --- Floating badge (hero trust pill) --- */
@keyframes wd-float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-7px); }
}
.wd-float { animation: wd-float 3s ease-in-out infinite; }

/* --- Scroll indicator bounce --- */
@keyframes wd-bounce-down {
  0%, 100% { transform: translateY(0) translateX(-50%); opacity: 0.7; }
  50%       { transform: translateY(9px) translateX(-50%); opacity: 1; }
}
.wd-scroll-indicator {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  animation: wd-bounce-down 1.8s ease-in-out infinite;
  z-index: 20;
}

/* --- Phone CTA ring pulse --- */
@keyframes wd-ring {
  0%   { box-shadow: 0 0 0 0 rgba(212,160,23,0.6); }
  70%  { box-shadow: 0 0 0 16px rgba(212,160,23,0); }
  100% { box-shadow: 0 0 0 0 rgba(212,160,23,0); }
}
.wd-ring-pulse { animation: wd-ring 1.9s ease-out infinite; }

/* --- Section ticker band --- */
@keyframes wd-ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.wd-ticker-track {
  animation: wd-ticker 24s linear infinite;
  white-space: nowrap;
}
.wd-ticker-track:hover { animation-play-state: paused; }

/* --- Gradient heading text --- */
.wd-gradient-text {
  background: linear-gradient(135deg, #D4A017 0%, #f5c842 55%, #c8940f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Star pop animation (testimonial) --- */
@keyframes wd-star-pop {
  0%   { transform: scale(0) rotate(-20deg); opacity: 0; }
  70%  { transform: scale(1.3) rotate(6deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
.wd-star-anim {
  display: inline-block;
  animation: wd-star-pop 0.45s cubic-bezier(0.34,1.56,0.64,1) both;
  opacity: 0;
}

/* --- Card mustard glow hover --- */
.wd-card-glow {
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.wd-card-glow:hover {
  box-shadow: 0 8px 36px rgba(212,160,23,0.25), 0 2px 10px rgba(0,0,0,0.06);
  transform: translateY(-5px);
}

/* --- Card top accent stripe (animated on hover) --- */
.wd-card-accent {
  position: relative;
  overflow: hidden;
}
.wd-card-accent::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, #D4A017, #f5c842);
  border-radius: 3px 3px 0 0;
  position: absolute;
  top: 0; left: 0; right: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.wd-card-accent:hover::before { transform: scaleX(1); }

/* --- Icon pulse ring on hover --- */
.wd-icon-ring {
  position: relative;
  transition: transform 0.3s ease;
}
.wd-icon-ring::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid #D4A017;
  opacity: 0;
  transform: scale(0.75);
  transition: opacity 0.3s, transform 0.3s;
}
.wd-card-glow:hover .wd-icon-ring::after {
  opacity: 0.55;
  transform: scale(1.12);
}

/* --- Split media angled clip shape --- */
.wd-split-img-wrap {
  clip-path: polygon(0 0, 100% 0, 100% 93%, 93% 100%, 0 100%);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.14);
}

/* --- Vertical mustard accent bar (split text col) --- */
.wd-text-accent {
  border-left: 3px solid #D4A017;
  padding-left: 1rem;
}

/* --- How It Works step connector dotted line --- */
.wd-hiw-line {
  position: absolute;
  top: 28px;
  left: calc(50% + 32px);
  right: 0;
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    #D4A017 0, #D4A017 6px,
    transparent 6px, transparent 14px
  );
  opacity: 0;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.65s ease 0.2s, opacity 0.3s ease;
}
.wd-hiw-step-wrap.animated .wd-hiw-line {
  opacity: 0.45;
  transform: scaleX(1);
}

/* --- Nearby area card lift + glow --- */
.nearby-area-card {
  transition: transform 0.3s cubic-bezier(0.34,1.36,0.64,1), box-shadow 0.3s ease;
}
.nearby-area-card:hover {
  transform: translateY(-7px) scale(1.03);
  box-shadow: 0 14px 36px rgba(212,160,23,0.22);
}

/* --- Progress bar at top of page while scrolling --- */
#wd-scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #D4A017, #f5c842, #D4A017);
  z-index: 9999;
  pointer-events: none;
  transition: width 0.08s linear;
}

/* --- Hero badge glassmorphism --- */
.wd-hero-badge {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
}

/* --- Testimonial quote shimmer overlay --- */
.wd-quote-wrap {
  position: relative;
  overflow: hidden;
}
.wd-quote-wrap::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
  animation: wd-quote-shine 3.5s ease 1.5s infinite;
}
@keyframes wd-quote-shine {
  0%   { left: -60%; }
  100% { left: 120%; }
}

/* =============================================
   VEHICLE REGISTRATION LOOKUP — HERO STYLES
   ============================================= */

/* --- VRM Input --- */
.wd-vrm-input {
  font-family: 'Rajdhani', 'Inter', monospace;
  font-weight: 600;
  letter-spacing: 0.15em;
  transition: all 0.25s ease;
}
.wd-vrm-input::placeholder {
  letter-spacing: normal;
  font-weight: 400;
  opacity: 0.5;
}
.wd-vrm-input:focus {
  box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.25);
}

/* --- Loading spinner (car animation) --- */
@keyframes wd-car-bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
@keyframes wd-dot-pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50%      { opacity: 1; transform: scale(1); }
}
.wd-loading-car {
  animation: wd-car-bounce 0.8s ease-in-out infinite;
}
.wd-loading-dot {
  animation: wd-dot-pulse 1.2s ease-in-out infinite;
}
.wd-loading-dot:nth-child(2) { animation-delay: 0.2s; }
.wd-loading-dot:nth-child(3) { animation-delay: 0.4s; }

/* --- Vehicle card fade-in/scale-in --- */
@keyframes wd-card-enter {
  0%   { opacity: 0; transform: scale(0.92) translateY(12px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
.wd-card-enter {
  animation: wd-card-enter 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* --- Vehicle verified badge --- */
.wd-verified-badge {
  background: linear-gradient(135deg, #16A34A, #15803D);
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
}

/* --- Service card hover --- */
.wd-service-card {
  transition: transform 0.3s cubic-bezier(0.34, 1.36, 0.64, 1),
              box-shadow 0.3s ease;
}
.wd-service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(212, 160, 23, 0.2), 0 4px 12px rgba(0, 0, 0, 0.08);
}
.wd-service-card .service-arrow {
  transition: transform 0.3s ease;
}
.wd-service-card:hover .service-arrow {
  transform: translateX(4px);
}

/* --- Back to search button --- */
.wd-back-btn {
  transition: all 0.25s ease;
}
.wd-back-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* --- Trust row items --- */
.wd-trust-item {
  transition: opacity 0.3s ease;
}

/* --- Error state --- */
.wd-error-state {
  animation: wd-card-enter 0.35s ease both;
}

/* --- "Welcome Back" banner --- */
@keyframes wd-slide-down {
  0%   { opacity: 0; transform: translateY(-16px); }
  100% { opacity: 1; transform: translateY(0); }
}
.wd-welcome-back {
  animation: wd-slide-down 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* --- Skeleton loader --- */
.wd-skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: wd-shimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
}
@keyframes wd-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --- How It Works step number badge --- */
.wd-hiw-num {
  background: linear-gradient(135deg, #D4A017, #f5c842);
  color: #000;
  font-weight: 800;
  font-size: 0.7rem;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: -6px; right: -6px;
  box-shadow: 0 2px 8px rgba(212,160,23,0.5);
}

/* --- Section heading underline draw --- */
.wd-heading-underline {
  display: inline-block;
  position: relative;
}
.wd-heading-underline::after {
  content: '';
  position: absolute;
  bottom: -6px; left: 0;
  width: 0; height: 3px;
  background: linear-gradient(90deg, #D4A017, #f5c842);
  border-radius: 2px;
  transition: width 0.5s ease;
}
.wd-heading-underline.animated::after { width: 100%; }