/* =============================================
   PullRate — Junkyard Inventory & Pricing Platform
   Design: Industrial, Bold, Amber on Charcoal
   ============================================= */

:root {
  --bg: #0e0e0e;
  --bg-card: #181818;
  --bg-surface: #1e1e1e;
  --fg: #f0ede8;
  --fg-muted: #8a8680;
  --accent: #f59e0b;
  --accent-dim: rgba(245, 158, 11, 0.12);
  --border: rgba(240, 237, 232, 0.1);
  --border-accent: rgba(245, 158, 11, 0.35);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---- NAVBAR ---- */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(14,14,14,0.92);
  backdrop-filter: blur(12px);
  z-index: 100;
}
.nav-logo { display: flex; align-items: center; gap: 0.5rem; }
.logo-mark { font-size: 1.2rem; color: var(--accent); }
.logo-text { font-family: 'Bebas Neue', sans-serif; font-size: 1.6rem; letter-spacing: 0.06em; color: var(--fg); }
.nav-tag { font-size: 0.75rem; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.12em; }

/* ---- HERO ---- */
.hero {
  padding: 5rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}
.hero-bg-shape {
  position: absolute;
  top: -120px; right: -80px;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(245,158,11,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.hero-eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 1.25rem;
  font-weight: 500;
}
.hero-headline {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 1.0;
  letter-spacing: 0.02em;
  color: var(--fg);
  margin-bottom: 1.5rem;
}
.hero-sub {
  font-size: 1.05rem;
  color: var(--fg-muted);
  line-height: 1.7;
  max-width: 420px;
}

/* ---- YARD CARD (hero visual) ---- */
.yard-card {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5), 0 0 0 1px var(--border);
}
.yard-card-top {
  background: linear-gradient(135deg, #1a1a1a 0%, #252520 100%);
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.yard-badge {
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  border: 1px solid var(--border-accent);
  white-space: nowrap;
}
.yard-count {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.8rem;
  color: var(--fg);
  line-height: 1;
  flex: 1;
}
.yard-label {
  font-size: 0.7rem;
  color: var(--fg-muted);
  text-align: right;
  line-height: 1.4;
}
.yard-rows { padding: 0.75rem 0; }
.yard-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.yard-row:last-child { border-bottom: none; }
.yard-row.muted { opacity: 0.5; }
.part-name { font-size: 0.78rem; color: var(--fg); }
.part-price { font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 0.85rem; color: var(--accent); }
.yard-card-cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.5rem;
  background: var(--accent-dim);
  border-top: 1px solid var(--border-accent);
  cursor: pointer;
}
.cta-label { font-size: 0.75rem; color: var(--accent); font-weight: 500; }
.cta-icon { font-size: 1.4rem; color: var(--accent); font-weight: 300; }

/* ---- STATS ROW ---- */
.stats-row {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 2rem;
  gap: 3rem;
}
.stat { text-align: center; }
.stat-value {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.6rem;
  color: var(--fg);
  line-height: 1;
  margin-bottom: 0.4rem;
}
.stat-label { font-size: 0.72rem; color: var(--fg-muted); max-width: 180px; line-height: 1.5; }
.stat-divider { width: 1px; height: 50px; background: var(--border); }

/* ---- FEATURES ---- */
.features {
  padding: 6rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}
.features-header { margin-bottom: 3.5rem; }
.section-eyebrow {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 0.75rem;
  font-weight: 500;
}
.section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: var(--fg);
}
.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.feature-card {
  background: var(--bg);
  padding: 2.5rem;
}
.feature-icon { margin-bottom: 1.25rem; }
.icon-box {
  display: inline-block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  padding: 0.3rem 0.65rem;
  border-radius: 4px;
}
.feature-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}
.feature-desc {
  font-size: 0.9rem;
  color: var(--fg-muted);
  line-height: 1.7;
}

/* ---- HOW IT WORKS ---- */
.how-section {
  padding: 5rem 2rem;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
}
.how-header { max-width: 1100px; margin: 0 auto 3rem; }
.how-steps {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.step {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.75rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.step-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.2rem;
  color: var(--accent);
  line-height: 1;
  flex-shrink: 0;
  width: 40px;
}
.step-body h4 { font-size: 0.95rem; font-weight: 600; color: var(--fg); margin-bottom: 0.4rem; }
.step-body p { font-size: 0.82rem; color: var(--fg-muted); line-height: 1.6; }
.step-arrow { color: var(--fg-muted); flex-shrink: 0; opacity: 0.5; }

/* ---- PHILOSOPHY ---- */
.philosophy {
  padding: 5rem 2rem;
  max-width: 900px;
  margin: 0 auto;
}
.philosophy-inner { text-align: center; }
.philosophy-rule { width: 60px; height: 1px; background: var(--accent); margin: 0 auto 2.5rem; }
.philosophy-quote {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  font-weight: 400;
  font-style: italic;
  color: var(--fg);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}
.philosophy-attribution {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 2.5rem;
}

/* ---- CLOSING ---- */
.closing {
  padding: 5rem 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-surface) 100%);
}
.closing-headline {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.2rem, 5vw, 4rem);
  letter-spacing: 0.02em;
  line-height: 1.1;
  color: var(--fg);
  margin-bottom: 1.25rem;
}
.closing-sub {
  font-size: 1rem;
  color: var(--fg-muted);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto 2.5rem;
}
.closing-rule { width: 40px; height: 2px; background: var(--accent); margin: 0 auto 1.25rem; }
.closing-tag { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--fg-muted); }

/* ---- FOOTER ---- */
.footer {
  padding: 2.5rem 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}
.footer-logo { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.footer-desc { font-size: 0.78rem; color: var(--fg-muted); max-width: 280px; line-height: 1.5; }
.footer-links { font-size: 0.72rem; color: var(--fg-muted); }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-visual { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .stats-row { flex-direction: column; gap: 1.5rem; }
  .stat-divider { width: 40px; height: 1px; }
  .how-steps { flex-direction: column; }
  .step-arrow { transform: rotate(90deg); }
  .footer { flex-direction: column; gap: 1.5rem; text-align: center; }
  .footer-desc { max-width: 100%; }
}

/* =============================================
   App-specific styles (Yard Inventory MVP)
   ============================================= */

.app-nav { display: flex; gap: 0.5rem; align-items: center; }
.app-nav-link {
  font-size: 0.8rem; color: var(--fg-muted); text-decoration: none;
  padding: 0.35rem 0.75rem; border-radius: 6px; transition: all 0.15s;
}
.app-nav-link:hover { color: var(--fg); background: var(--bg-surface); }
.app-nav-link.active { color: var(--accent); background: var(--accent-dim); }

.container { max-width: 900px; margin: 0 auto; padding: 2rem 1.5rem; }
.page-header { margin-bottom: 2rem; }
.page-title { font-family: 'Bebas Neue', sans-serif; font-size: 2.2rem; letter-spacing: 0.03em; color: var(--fg); }
.page-sub { font-size: 0.85rem; color: var(--fg-muted); margin-top: 0.25rem; }

/* Cards */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.card-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.card-title { font-size: 0.9rem; font-weight: 600; color: var(--fg); }
.card-body { padding: 1.25rem; }

/* Stats bar */
.stats-bar {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 2rem;
}
.stat-box { background: var(--bg-card); padding: 1.5rem; text-align: center; }
.stat-box-value { font-family: 'Bebas Neue', sans-serif; font-size: 2rem; color: var(--accent); line-height: 1; }
.stat-box-label { font-size: 0.72rem; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 0.35rem; }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--fg-muted); padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); font-weight: 500; }
.data-table td { padding: 0.85rem 1rem; border-bottom: 1px solid var(--border); font-size: 0.875rem; color: var(--fg); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-surface); }
.data-table .mono { font-family: monospace; font-size: 0.8rem; color: var(--fg-muted); }

/* Condition badges */
.badge { display: inline-block; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; padding: 0.2rem 0.5rem; border-radius: 4px; font-weight: 500; }
.badge-good { background: rgba(34,197,94,0.15); color: #22c55e; border: 1px solid rgba(34,197,94,0.3); }
.badge-fair { background: rgba(245,158,11,0.15); color: var(--accent); border: 1px solid var(--border-accent); }
.badge-poor { background: rgba(239,68,68,0.15); color: #ef4444; border: 1px solid rgba(239,68,68,0.3); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.55rem 1rem; border-radius: 7px; font-size: 0.82rem; font-weight: 500; cursor: pointer; border: 1px solid transparent; transition: all 0.15s; text-decoration: none; }
.btn-primary { background: var(--accent); color: #0e0e0e; }
.btn-primary:hover { background: #d97706; }
.btn-ghost { border-color: var(--border); color: var(--fg-muted); }
.btn-ghost:hover { border-color: var(--fg-muted); color: var(--fg); }
.btn-danger { background: rgba(239,68,68,0.15); color: #ef4444; border-color: rgba(239,68,68,0.3); }
.btn-danger:hover { background: rgba(239,68,68,0.25); }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.75rem; }

/* Forms */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 0.78rem; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.4rem; }
.form-input { width: 100%; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 7px; padding: 0.65rem 0.85rem; color: var(--fg); font-size: 0.875rem; font-family: 'DM Sans', sans-serif; transition: border-color 0.15s; }
.form-input:focus { outline: none; border-color: var(--accent); }
.form-input::placeholder { color: var(--fg-muted); opacity: 0.6; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.form-error { font-size: 0.78rem; color: #ef4444; margin-top: 0.35rem; }
select.form-input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238a8680' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; padding-right: 2rem; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; z-index: 200; padding: 1rem; }
.modal { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; }
.modal-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-title { font-size: 1rem; font-weight: 600; color: var(--fg); }
.modal-close { background: none; border: none; color: var(--fg-muted); font-size: 1.5rem; cursor: pointer; line-height: 1; }
.modal-close:hover { color: var(--fg); }
.modal-body { padding: 1.5rem; }

/* Vehicle cards */
.vehicle-list { display: grid; gap: 1rem; }
.vehicle-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 1rem 1.25rem; display: flex; justify-content: space-between; align-items: flex-start; cursor: pointer; transition: border-color 0.15s; }
.vehicle-card:hover { border-color: var(--border-accent); }
.vehicle-name { font-weight: 600; font-size: 0.95rem; color: var(--fg); }
.vehicle-vin { font-family: monospace; font-size: 0.75rem; color: var(--fg-muted); margin-top: 0.2rem; }
.vehicle-meta { font-size: 0.78rem; color: var(--fg-muted); margin-top: 0.35rem; }
.vehicle-part-count { background: var(--accent-dim); color: var(--accent); font-size: 0.75rem; font-weight: 500; padding: 0.2rem 0.6rem; border-radius: 20px; white-space: nowrap; }

/* Public yard */
.yard-header { text-align: center; padding: 3rem 1.5rem; border-bottom: 1px solid var(--border); }
.yard-name { font-family: 'Bebas Neue', sans-serif; font-size: 2.8rem; letter-spacing: 0.03em; color: var(--fg); margin-bottom: 0.5rem; }
.yard-contact { font-size: 0.875rem; color: var(--fg-muted); display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; }
.part-list-item { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); }
.part-list-item:last-child { border-bottom: none; }
.part-info { flex: 1; }
.part-name-text { font-size: 0.95rem; font-weight: 500; color: var(--fg); }
.part-vehicle { font-size: 0.78rem; color: var(--fg-muted); margin-top: 0.2rem; }
.part-meta-row { display: flex; gap: 0.75rem; align-items: center; margin-top: 0.4rem; }
.part-price-big { font-family: 'Bebas Neue', sans-serif; font-size: 1.4rem; color: var(--accent); }
.part-mileage { font-size: 0.75rem; color: var(--fg-muted); }

/* Alert */
.alert { padding: 0.85rem 1rem; border-radius: 7px; font-size: 0.85rem; margin-bottom: 1rem; }
.alert-success { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.25); color: #22c55e; }
.alert-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.25); color: #ef4444; }

/* Empty state */
.empty-state { text-align: center; padding: 3rem 1.5rem; color: var(--fg-muted); }
.empty-state-icon { font-size: 2.5rem; margin-bottom: 0.75rem; opacity: 0.4; }
.empty-state-text { font-size: 0.875rem; }

/* Tabs */
.tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--border); margin-bottom: 2rem; }
.tab { padding: 0.6rem 1rem; font-size: 0.82rem; color: var(--fg-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all 0.15s; text-decoration: none; }
.tab:hover { color: var(--fg); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* VIN decode section */
.vin-section { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 10px; padding: 1.25rem; margin-bottom: 1.5rem; }
.vin-input-row { display: flex; gap: 0.75rem; }
.vin-input-row .form-input { font-family: monospace; letter-spacing: 0.05em; text-transform: uppercase; }
.vin-decoded { margin-top: 1rem; padding: 1rem; background: var(--bg-card); border: 1px solid var(--border-accent); border-radius: 7px; }
.vin-decoded-title { font-size: 0.78rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.75rem; }
.vin-decoded-value { font-size: 1.1rem; font-weight: 600; color: var(--fg); }

@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: 1fr; }
  .data-table { font-size: 0.8rem; }
  .data-table th, .data-table td { padding: 0.6rem 0.75rem; }
  .modal { max-width: 100%; }
}

@media (max-width: 480px) {
  .hero { padding: 3rem 1.25rem 3rem; }
  .features { padding: 4rem 1.25rem; }
  .how-section { padding: 4rem 1.25rem; }
  .philosophy { padding: 4rem 1.25rem; }
  .navbar { padding: 1rem 1.25rem; }
  .app-nav-link span { display: none; }
}