/* =========================================================================
   215JunkCars — custom component & motion layer
   Tailwind handles layout/utilities in markup; this file owns brand
   components, animations, and anything Tailwind utilities are awkward for.
   ========================================================================= */

:root {
  --red: #e4131a;
  --red-dark: #b00c12;
  --red-bright: #ff2a2a;
  --ink: #0a0a0c;
  --coal: #15151a;
  --graphite: #22232b;
  --steel: #9aa3ad;
  --silver: #d7dce1;
}

html { scroll-behavior: smooth; }
body { font-family: "Barlow", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }

/* Display headings get the condensed, slightly compressed automotive look */
.font-display { letter-spacing: -0.01em; }
.headline { font-family: "Barlow Condensed", system-ui, sans-serif; font-weight: 800; line-height: 0.95; letter-spacing: -0.02em; text-transform: uppercase; }

/* ----- Buttons -------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  font-family: "Barlow Condensed", sans-serif; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.03em; line-height: 1; border-radius: 0.65rem;
  padding: 0.95rem 1.6rem; font-size: 1.15rem; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap; border: 2px solid transparent;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 10px 30px -10px rgba(228,19,26,0.65); }
.btn-primary:hover { background: var(--red-dark); box-shadow: 0 14px 38px -10px rgba(228,19,26,0.8); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.28); }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,0.06); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; transform: translateY(-2px); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: #f1f1f1; transform: translateY(-2px); }
.btn-sm { padding: 0.6rem 1rem; font-size: 0.95rem; border-radius: 0.5rem; }
.btn-lg { padding: 1.15rem 2rem; font-size: 1.3rem; }

/* ----- Header --------------------------------------------------------- */
.nav-link { position: relative; font-weight: 600; color: var(--silver); transition: color .2s; padding: 0.35rem 0; }
.nav-link:hover { color: #fff; }
.nav-link.active { color: #fff; }
.nav-link.active::after, .nav-link:hover::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--red); border-radius: 2px;
}
.site-header.scrolled { background: rgba(10,10,12,0.92); backdrop-filter: blur(10px); border-bottom-color: rgba(255,255,255,0.08); }

/* mobile menu */
#mobile-menu { transition: max-height .35s ease, opacity .25s ease; max-height: 0; opacity: 0; overflow: hidden; }
#mobile-menu.open { max-height: 80vh; opacity: 1; }

/* ----- Hero / decorative --------------------------------------------- */
.hero-grid {
  background-image: linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 40%, transparent 100%);
          mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 40%, transparent 100%);
}
.red-streak { background: linear-gradient(90deg, transparent, var(--red) 40%, var(--red-bright) 60%, transparent); }
.text-gradient-steel { background: linear-gradient(180deg,#fff 0%, #c2c8cf 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ----- Trust marquee -------------------------------------------------- */
.marquee { overflow: hidden; }
.marquee__track { display: flex; gap: 3rem; width: max-content; animation: marquee 28s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ----- Cards ---------------------------------------------------------- */
.card-hover { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.card-hover:hover { transform: translateY(-5px); box-shadow: 0 24px 50px -24px rgba(0,0,0,0.5); }

/* ----- Step badge / how it works ------------------------------------- */
.step-num {
  font-family: "Barlow Condensed", sans-serif; font-weight: 800; font-size: 2.2rem;
  width: 4rem; height: 4rem; display: grid; place-items: center; border-radius: 1rem;
  background: linear-gradient(160deg, var(--red), var(--red-dark)); color: #fff;
  box-shadow: 0 12px 26px -10px rgba(228,19,26,0.7);
}

/* ----- Multi-step Offer form ----------------------------------------- */
.fstep { display: none; animation: fade-up .45s cubic-bezier(0.16,1,0.3,1) both; }
.fstep.active { display: block; }
@keyframes fade-up { from { opacity:0; transform: translateY(14px);} to {opacity:1; transform:translateY(0);} }

.field-label { font-weight: 600; font-size: 0.92rem; color: #2b2b30; margin-bottom: 0.3rem; display: block; }
.field {
  width: 100%; padding: 0.85rem 1rem; border: 1.5px solid #d7dbe0; border-radius: 0.6rem;
  font-size: 1rem; background: #fff; transition: border-color .15s, box-shadow .15s; color: #15151a;
}
.field:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 4px rgba(228,19,26,0.12); }
.field.err { border-color: var(--red); background: #fff6f6; }

/* option chips (condition / yes-no etc.) */
.chip {
  border: 1.5px solid #d7dbe0; border-radius: 0.6rem; padding: 0.85rem 1rem; cursor: pointer;
  font-weight: 600; color: #2b2b30; background: #fff; transition: all .15s; user-select: none; text-align: center;
}
.chip:hover { border-color: #b9bfc6; }
.chip.sel { border-color: var(--red); background: #fff1f1; color: var(--red-dark); box-shadow: 0 0 0 3px rgba(228,19,26,0.1); }

/* progress bar */
.prog-step { flex: 1; text-align: center; position: relative; }
.prog-dot { width: 2.1rem; height: 2.1rem; border-radius: 999px; display: grid; place-items: center; font-weight: 700;
  background: #e7e9ec; color: #8a9099; margin: 0 auto; transition: all .25s; font-family:"Barlow Condensed",sans-serif; font-size:1.05rem;}
.prog-step.done .prog-dot { background: var(--red); color: #fff; }
.prog-step.current .prog-dot { background: var(--ink); color: #fff; box-shadow: 0 0 0 4px rgba(10,10,12,0.12); }
.prog-line { position: absolute; top: 1.05rem; left: -50%; right: 50%; height: 3px; background: #e7e9ec; z-index: -1; }
.prog-step.done .prog-line, .prog-step.current .prog-line { background: var(--red); }
.prog-step:first-child .prog-line { display: none; }
.prog-label { font-size: 0.72rem; font-weight: 600; color: #8a9099; margin-top: 0.4rem; text-transform: uppercase; letter-spacing: 0.03em; }
.prog-step.current .prog-label, .prog-step.done .prog-label { color: #15151a; }

/* photo upload tiles */
.photo-tile { border: 1.5px dashed #c9ced4; border-radius: 0.6rem; aspect-ratio: 4/3; display: grid; place-items: center;
  text-align: center; cursor: pointer; color: #8a9099; font-weight: 600; transition: all .15s; background: #fafbfc; overflow: hidden; position: relative; font-size: 0.8rem; padding: 0.4rem;}
.photo-tile:hover { border-color: var(--red); color: var(--red-dark); background: #fff5f5; }
.photo-tile.filled { border-style: solid; border-color: var(--red); color: var(--red-dark); }
.photo-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ----- FAQ accordion -------------------------------------------------- */
.faq-q { cursor: pointer; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-item.open .faq-a { max-height: 600px; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-icon { transition: transform .25s; }

/* ----- Sticky mobile CTA bar ----------------------------------------- */
.mobile-cta { box-shadow: 0 -8px 30px -8px rgba(0,0,0,0.35); }

/* ----- Scroll reveal -------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s cubic-bezier(0.16,1,0.3,1), transform .6s cubic-bezier(0.16,1,0.3,1); }
.reveal.in { opacity: 1; transform: none; }

/* ----- Dashboard (admin) --------------------------------------------- */
.status-pill { font-size: 0.72rem; font-weight: 700; padding: 0.2rem 0.6rem; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.03em; white-space: nowrap; }
.timer-ok { color: #15803d; }
.timer-warn { color: #b45309; }
.timer-danger { color: #dc2626; }
.lead-row { transition: background .15s; }
.lead-row:hover { background: #f7f8fa; }
.lead-row.selected { background: #fff1f1; }

/* drawer */
#lead-drawer { transition: transform .3s cubic-bezier(0.16,1,0.3,1); }
.drawer-closed { transform: translateX(100%); }

/* utility */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .btn, .card-hover { transition: none !important; }
  .marquee__track { animation: none !important; }
  .animate-pulse-ring { animation: none !important; }
  html { scroll-behavior: auto; }
}
