/* ===================================================================
   QUES SITE SCRAPER — styles
   Palette: Void Black / Neon Blood Red / Neon Orange / Gold Flake
=================================================================== */

:root {
  --void:        #0a0607;
  --void-soft:   #150b0d;
  --panel:       #1c1214;
  --panel-2:     #241619;
  --line:        rgba(212, 175, 55, 0.22);
  --line-bright: rgba(212, 175, 55, 0.45);

  --blood:       #ff1b3d;
  --blood-deep:  #8c0524;
  --inferno:     #ff7a1a;
  --gold:        #d4af37;
  --gold-bright: #ffe9a8;
  --white-electric: #f5f4ff;

  --text:        #f3e9e6;
  --text-dim:    #c9b3ad;
  --text-faint:  #8a7672;

  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-body:    "Inter", -apple-system, "Segoe UI", sans-serif;
  --font-mono:    "JetBrains Mono", "Courier New", monospace;

  --radius: 14px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
[hidden] { display: none !important; }

body {
  background: var(--void);
  background-image:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(255, 122, 26, 0.16), transparent 60%),
    radial-gradient(ellipse 700px 500px at 90% 0%, rgba(255, 27, 61, 0.14), transparent 60%);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--gold-bright); }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------------------------------------------------------------
   Header
--------------------------------------------------------------- */
.site-header {
  position: relative;
  padding: 56px 0 28px;
  overflow: hidden;
}

.header-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 0%, rgba(255, 27, 61, 0.18), transparent 55%);
}

.header-inner {
  position: relative;
  z-index: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--line-bright), 0 0 28px rgba(255, 122, 26, 0.45);
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 5vw, 44px);
  letter-spacing: 0.04em;
  margin: 0;
  background: linear-gradient(90deg, var(--blood) 0%, var(--inferno) 55%, var(--gold-bright) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 36px rgba(255, 122, 26, 0.25);
}

.brand-name span {
  color: var(--white-electric);
  -webkit-text-fill-color: var(--white-electric);
  font-weight: 500;
}

.tagline {
  margin: 4px 0 0;
  color: var(--text-dim);
  font-size: 15px;
  letter-spacing: 0.01em;
}

.header-desc {
  position: relative;
  z-index: 1;
  margin: 22px auto 0;
  max-width: 720px;
  color: var(--text-dim);
  font-size: 16px;
}

.header-desc strong { color: var(--gold-bright); font-weight: 600; }

/* ---------------------------------------------------------------
   Signature element: gold-flake spark divider
--------------------------------------------------------------- */
.spark-divider {
  position: relative;
  height: 2px;
  margin: 8px auto 40px;
  max-width: 1100px;
  background: linear-gradient(90deg, transparent, var(--gold) 15%, var(--gold-bright) 50%, var(--gold) 85%, transparent);
  opacity: 0.6;
}

.spark-divider .spark {
  position: absolute;
  top: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 8px 2px rgba(255, 233, 168, 0.9);
  animation: drift 6s linear infinite, twinkle 1.8s ease-in-out infinite;
}

.spark-divider .spark:nth-child(1) { left: 5%;  animation-delay: 0s, 0.2s; }
.spark-divider .spark:nth-child(2) { left: 28%; animation-delay: 1.1s, 0.6s; }
.spark-divider .spark:nth-child(3) { left: 50%; animation-delay: 2.3s, 0s; }
.spark-divider .spark:nth-child(4) { left: 72%; animation-delay: 3.4s, 0.9s; }
.spark-divider .spark:nth-child(5) { left: 90%; animation-delay: 4.6s, 0.3s; }

@keyframes drift {
  0%   { transform: translateY(0) scale(1); }
  50%  { transform: translateY(-6px) scale(1.2); }
  100% { transform: translateY(0) scale(1); }
}
@keyframes twinkle {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 1; }
}

/* ---------------------------------------------------------------
   Panels (search + results)
--------------------------------------------------------------- */
.panel {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 36px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.5);
}

.panel-title {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.03em;
  font-size: 20px;
  margin: 0 0 18px;
  color: var(--white-electric);
  text-transform: uppercase;
}

/* Form fields */
.field-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.field { display: flex; flex-direction: column; gap: 6px; }

.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.field label .optional {
  text-transform: none;
  font-weight: 400;
  color: var(--text-faint);
  letter-spacing: normal;
}

.field input,
.field select {
  background: var(--void-soft);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input::placeholder { color: var(--text-faint); }

.field input:focus,
.field select:focus {
  border-color: var(--inferno);
  box-shadow: 0 0 0 3px rgba(255, 122, 26, 0.18);
}

.field-error {
  color: var(--blood);
  font-size: 13px;
  font-weight: 600;
  min-height: 18px;
  margin: 14px 0 0;
}

/* Buttons */
.btn-primary, .btn-secondary {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 15px;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: transform 0.12s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-primary {
  margin-top: 22px;
  width: 100%;
  padding: 15px 0;
  color: var(--void);
  background: linear-gradient(90deg, var(--blood), var(--inferno));
  box-shadow: 0 8px 26px rgba(255, 27, 61, 0.35), 0 0 0 1px rgba(255,233,168,0.15) inset;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-primary:disabled {
  cursor: progress;
  filter: grayscale(0.3) brightness(0.85);
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(10,6,7,0.35);
  border-top-color: var(--void);
  display: none;
}

.btn-primary.is-loading .btn-spinner {
  display: inline-block;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.btn-secondary {
  display: block;
  margin: 28px auto 0;
  padding: 12px 26px;
  background: transparent;
  color: var(--gold-bright);
  border: 1px solid var(--line-bright);
}

.btn-secondary:hover {
  background: rgba(212, 175, 55, 0.08);
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.25);
}

.status-line {
  margin: 16px 0 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--inferno);
  min-height: 18px;
}

.error-banner {
  margin: 14px 0 0;
  padding: 12px 14px;
  background: rgba(255, 27, 61, 0.1);
  border: 1px solid rgba(255, 27, 61, 0.35);
  border-radius: var(--radius-sm);
  color: #ffb3c0;
  font-size: 13px;
  line-height: 1.5;
}

/* ---------------------------------------------------------------
   Stats strip
--------------------------------------------------------------- */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 36px;
}

.stat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  color: var(--gold-bright);
  text-shadow: 0 0 18px rgba(212, 175, 55, 0.35);
}

.stat-label {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ---------------------------------------------------------------
   Results
--------------------------------------------------------------- */
.results-header { margin-bottom: 18px; }

.results-sub {
  margin: 0;
  color: var(--text-dim);
  font-size: 14px;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.empty-state {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  color: var(--text-faint);
}

.empty-state strong { color: var(--text-dim); }

.lead-card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  animation: card-in 0.35s ease backwards;
}

.lead-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-bright);
  box-shadow: 0 14px 32px rgba(0,0,0,0.55), 0 0 24px rgba(255, 122, 26, 0.12);
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.lead-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lead-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--void);
  flex-shrink: 0;
}

.lead-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  color: var(--white-electric);
  line-height: 1.25;
}

.lead-location {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-faint);
}

.lead-badges { display: flex; flex-wrap: wrap; gap: 8px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 4px 9px;
  border-radius: 999px;
}

.badge-no-site {
  background: rgba(255, 27, 61, 0.15);
  color: var(--blood);
  border: 1px solid rgba(255, 27, 61, 0.35);
}

.badge-source {
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-bright);
  border: 1px solid var(--line);
}

.lead-blurb {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0;
  line-height: 1.5;
}

.lead-contacts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--void-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
}

.contact-row button {
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.contact-row button:hover { color: var(--gold-bright); }

.contact-missing { color: var(--text-faint); font-style: italic; }

.maps-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold-bright);
  text-decoration: none;
  width: fit-content;
}
.maps-link:hover { text-decoration: underline; }

.lead-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.lead-actions button {
  flex: 1;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 9px 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-body);
  transition: filter 0.15s ease, background 0.15s ease;
}

.btn-pitch {
  background: var(--gold);
  color: var(--void);
  border: none;
}
.btn-pitch:hover { filter: brightness(1.1); }

.btn-save {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--line);
}
.btn-save:hover { border-color: var(--line-bright); color: var(--gold-bright); }
.btn-save.is-saved {
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-bright);
  border-color: var(--line-bright);
}

.pitch-box {
  display: none;
  font-size: 12.5px;
  color: var(--text-dim);
  background: var(--void-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  white-space: pre-wrap;
}
.pitch-box.is-open { display: block; }

/* ---------------------------------------------------------------
   Ad slot + footer
--------------------------------------------------------------- */
.ad-slot {
  margin-bottom: 40px;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-note {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-faint);
  max-width: 640px;
}

.footer-credit {
  margin: 0;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  text-transform: uppercase;
}

/* ---------------------------------------------------------------
   Toast
--------------------------------------------------------------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 12px);
  background: var(--gold);
  color: var(--void);
  font-weight: 600;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
}
.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------------------------------------------------------------
   Responsive
--------------------------------------------------------------- */
@media (max-width: 860px) {
  .field-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-strip { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .field-grid { grid-template-columns: 1fr; }
  .brand { gap: 12px; }
  .brand-mark { width: 44px; height: 44px; }
  .panel { padding: 20px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .spark-divider .spark { animation: none; opacity: 0.7; }
  .lead-card { animation: none; }
  .btn-primary:hover { transform: none; }
}
