/* ═══════════════════════════════════════════════════
   i-Tow Cash For Cars — Custom Styles
   Complements Tailwind CDN
   ═══════════════════════════════════════════════════ */

/* ── Base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ── Scrollbar ───────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #16a34a; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #15803d; }

/* ── Text shadow util ────────────────────────────── */
.text-shadow    { text-shadow: 0 2px 4px rgba(0,0,0,.35); }
.text-shadow-lg { text-shadow: 0 4px 12px rgba(0,0,0,.45); }

/* ── Scroll-reveal animations ────────────────────── */
.scroll-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease-out, transform 0.65s ease-out;
}
.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Nav link active state ───────────────────────── */
.nav-link.active {
  color: #16a34a;
  background-color: #f0fdf4;
  border-radius: 0.5rem;
}

/* ── Sticky call button pulse ────────────────────── */
@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(234,179,8,.55); }
  50%       { box-shadow: 0 0 0 14px rgba(234,179,8,0); }
}
@keyframes waPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37,211,102,.55); }
  50%       { box-shadow: 0 0 0 14px rgba(37,211,102,0); }
}

.cta-pulse { animation: ctaPulse 2.5s ease-in-out infinite; }
.wa-pulse  { animation: waPulse  2s   ease-in-out infinite; }

/* ── Testimonial slider ──────────────────────────── */
#testimonial-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}

.slide-dot.active {
  background-color: #16a34a;
  width: 1.5rem;
}

/* ── FAQ accordion ───────────────────────────────── */
.faq-answer {
  animation: fadeDown 0.25s ease-out;
}
@keyframes fadeDown {
  from { opacity:0; transform: translateY(-6px); }
  to   { opacity:1; transform: translateY(0); }
}

/* ── Form focus ring ─────────────────────────────── */
input:focus, select:focus, textarea:focus {
  outline: none;
  box-shadow: 0 0 0 2px #16a34a;
}

/* ── Gradient text utility ───────────────────────── */
.text-gradient-green {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-gradient-yellow {
  background: linear-gradient(135deg, #eab308, #fde047);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Mobile bottom bar spacing ───────────────────── */
@media (max-width: 1023px) {
  body { padding-bottom: 68px; }
}

/* ── Mobile nav slide animation ──────────────────── */
#mobile-menu {
  transition: opacity 0.2s ease;
}

/* ── Ensure faq-answer transition ────────────────── */
.faq-answer {
  transition: none;
}

/* ── Fix focus ring color ─────────────────────────── */
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #16a34a;
  outline-offset: 0;
}

/* ── Lazy-load images ────────────────────────────── */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.4s ease;
}
img[loading="lazy"].loaded {
  opacity: 1;
}

/* ── Print ───────────────────────────────────────── */
@media print {
  .sticky, [class*="fixed"], footer > .fixed { display: none !important; }
}

/* ── Premium: Hero noise texture overlay ────────── */
.hero-noise::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.06;
}

/* ── Premium: Glassmorphism card ─────────────────── */
.glass-card {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.12);
}

/* ── Premium: Shimmer loading badge ─────────────── */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.shimmer {
  background: linear-gradient(90deg, #f0fdf4 25%, #dcfce7 50%, #f0fdf4 75%);
  background-size: 200% 100%;
  animation: shimmer 2.5s ease-in-out infinite;
}

/* ── Premium: Hover lift card ────────────────────── */
.card-hover {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -12px rgba(0,0,0,0.15);
}

/* ── Premium: Section divider wave ───────────────── */
.wave-bottom {
  position: relative;
}
.wave-bottom::after {
  content: '';
  display: block;
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 40px;
  background: inherit;
  clip-path: ellipse(55% 100% at 50% 0%);
}

/* ── Premium: Blog prose styles ──────────────────── */
.prose h2 { font-size: 1.5rem; font-weight: 800; color: #111827; margin: 2rem 0 0.75rem; }
.prose h3 { font-size: 1.2rem; font-weight: 700; color: #1f2937; margin: 1.5rem 0 0.5rem; }
.prose p  { color: #374151; line-height: 1.8; margin-bottom: 1rem; }
.prose ul { list-style: none; padding: 0; margin-bottom: 1rem; }
.prose ul li {
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: 0.5rem;
  color: #374151;
  line-height: 1.7;
}
.prose ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.5rem;
  height: 0.5rem;
  background: #16a34a;
  border-radius: 50%;
}
.prose ol { list-style: decimal; padding-left: 1.5rem; margin-bottom: 1rem; }
.prose ol li { color: #374151; line-height: 1.7; margin-bottom: 0.5rem; }
.prose strong { font-weight: 700; color: #111827; }
.prose a { color: #16a34a; font-weight: 600; text-decoration: underline; }
.prose a:hover { color: #15803d; }
.prose blockquote {
  border-left: 4px solid #16a34a;
  padding: 0.75rem 1.25rem;
  background: #f0fdf4;
  border-radius: 0 0.75rem 0.75rem 0;
  margin: 1.5rem 0;
  color: #166534;
  font-style: italic;
}

/* ── Premium: Stat counter pop ───────────────────── */
@keyframes countPop {
  0%   { transform: scale(0.8); opacity:0; }
  60%  { transform: scale(1.08); }
  100% { transform: scale(1);   opacity:1; }
}
.stat-visible { animation: countPop 0.5s ease-out forwards; }

/* ── Premium: Input field transitions ────────────── */
input, select, textarea {
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:hover:not(:focus), select:hover:not(:focus), textarea:hover:not(:focus) {
  border-color: #86efac;
}

/* ── Premium: Button press effect ────────────────── */
a[href^="tel"], button[type="submit"] {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
a[href^="tel"]:active, button[type="submit"]:active {
  transform: scale(0.97);
}

/* ── Premium: Header shadow on scroll ────────────── */
.header-scrolled {
  box-shadow: 0 4px 24px -4px rgba(0,0,0,0.12) !important;
}

/* ── Hero entrance animations ────────────────────── */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroSlideRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes orbFloat1 {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-24px) scale(1.04); }
}
@keyframes orbFloat2 {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(18px) scale(1.06); }
}
@keyframes orbFloat3 {
  0%, 100% { transform: translate(0, 0); }
  33%       { transform: translate(12px, -18px); }
  66%       { transform: translate(-10px, 12px); }
}

.hero-anim-badge    { opacity:0; animation: heroFadeIn 0.6s ease-out 0.1s forwards; }
.hero-anim-headline { opacity:0; animation: heroFadeUp 0.7s ease-out 0.25s forwards; }
.hero-anim-sub      { opacity:0; animation: heroFadeUp 0.7s ease-out 0.42s forwards; }
.hero-anim-pills    { opacity:0; animation: heroFadeUp 0.6s ease-out 0.55s forwards; }
.hero-anim-cta      { opacity:0; animation: heroFadeUp 0.6s ease-out 0.68s forwards; }
.hero-anim-stars    { opacity:0; animation: heroFadeIn 0.6s ease-out 0.82s forwards; }
.hero-anim-form     { opacity:0; animation: heroSlideRight 0.75s ease-out 0.35s forwards; }

.hero-orb-1 { animation: orbFloat1 7s ease-in-out infinite; }
.hero-orb-2 { animation: orbFloat2 9s ease-in-out infinite; }
.hero-orb-3 { animation: orbFloat3 11s ease-in-out infinite; }

/* ── Hero: diagonal light sweep ─────────────────────── */
@keyframes lightSweep {
  0%   { transform: translateX(-120%) skewX(-15deg); opacity: 0; }
  10%  { opacity: 1; }
  45%  { opacity: 1; }
  55%  { opacity: 0; transform: translateX(120%) skewX(-15deg); }
  100% { transform: translateX(120%) skewX(-15deg); opacity: 0; }
}
.hero-light-sweep::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: 0; right: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255,255,255,0.03) 45%,
    rgba(134,239,172,0.06) 50%,
    rgba(255,255,255,0.03) 55%,
    transparent 65%
  );
  animation: lightSweep 7s ease-in-out infinite;
}
.hero-light-sweep::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: 0; right: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255,255,255,0.015) 47%,
    rgba(253,224,71,0.04) 50%,
    rgba(255,255,255,0.015) 53%,
    transparent 65%
  );
  animation: lightSweep 7s ease-in-out 3.5s infinite;
}

/* ── Hero: floating particles ───────────────────────── */
@keyframes particleFloat {
  0%, 100% { transform: translateY(0) scale(1);    opacity: var(--p-op, 0.25); }
  33%       { transform: translateY(-18px) scale(1.2); opacity: calc(var(--p-op, 0.25) * 1.4); }
  66%       { transform: translateY(10px)  scale(0.8); opacity: calc(var(--p-op, 0.25) * 0.7); }
}
.hero-particle {
  position: absolute;
  background: rgba(134, 239, 172, 0.6);
  border-radius: 50%;
  animation: particleFloat linear infinite;
  will-change: transform, opacity;
}
.hero-particle:nth-child(3n)   { background: rgba(253, 224, 71, 0.5); }
.hero-particle:nth-child(5n)   { background: rgba(255, 255, 255, 0.4); }
.hero-particle:nth-child(7n)   { background: rgba(74, 222, 128, 0.55); }

/* ── Hero: road speed lines ─────────────────────────── */
@keyframes roadLine {
  0%   { transform: scaleX(0); opacity: 0;    transform-origin: right; }
  20%  { transform: scaleX(1); opacity: 0.35; transform-origin: right; }
  70%  { transform: scaleX(1); opacity: 0.2;  transform-origin: left; }
  100% { transform: scaleX(0); opacity: 0;    transform-origin: left; }
}
.hero-road-line {
  position: absolute;
  bottom: 18px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(134,239,172,0.4), transparent);
  border-radius: 2px;
  animation: roadLine 2.2s ease-in-out infinite;
}

/* ── Hero: drifting car silhouette ──────────────────── */
@keyframes carDrift {
  0%   { transform: translateX(-260px); opacity: 0; }
  8%   { opacity: 1; }
  88%  { opacity: 1; }
  100% { transform: translateX(calc(100vw + 260px)); opacity: 0; }
}
.hero-car-drift {
  animation: carDrift 18s linear infinite;
  will-change: transform;
}
