:root {
  --navy: #12213a;
  --navy-2: #1a2f52;
  --amber: #e08a2c;
  --amber-dark: #c8721a;
  --bg: #f7f8fb;
  --card: #ffffff;
  --text: #1c2333;
  --text-muted: #5c6577;
  --border: #e4e7ee;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(18, 33, 58, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}

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

h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }
p { margin: 0 0 16px; color: var(--text-muted); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn-primary {
  background: var(--amber);
  color: #fff;
}
.btn-primary:hover { background: var(--amber-dark); }
.btn-large { padding: 15px 30px; font-size: 16px; }
.btn-small { padding: 10px 18px; font-size: 14px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 248, 251, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--navy);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.logo-mark.small { width: 30px; height: 30px; font-size: 12px; border-radius: 8px; }
.header-nav { display: flex; gap: 28px; }
.header-nav a { color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500; }
.header-nav a:hover { color: var(--amber-dark); }

/* Hero */
.hero { padding: 64px 0 40px; }
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--amber-dark);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 14px;
}
.hero h1 { font-size: clamp(28px, 6vw, 42px); letter-spacing: -0.5px; }
.hero-sub { font-size: clamp(15px, 3.6vw, 17px); max-width: 520px; }
.hero-actions { display: flex; align-items: center; gap: 16px; margin: 22px 0 34px; flex-wrap: wrap; }
.hero-microcopy { font-size: 13px; color: var(--text-muted); }
.trust-row { display: flex; gap: 32px; flex-wrap: wrap; }
.trust-item { display: flex; flex-direction: column; }
.trust-item strong { font-size: 18px; color: var(--navy); }
.trust-item span { font-size: 12.5px; color: var(--text-muted); }

.mock-chat-card {
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 20px;
  max-width: 380px;
  margin-left: auto;
}
.mock-chat-header { display: flex; gap: 6px; margin-bottom: 14px; }
.mock-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.mock-bubble {
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  margin-bottom: 10px;
  max-width: 88%;
}
.mock-bubble.bot { background: #eef1f7; color: var(--text); border-bottom-left-radius: 4px; }
.mock-bubble.user { background: var(--navy); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }

/* How it works */
.how-it-works, .trades, .faq { padding: 56px 0; }
.how-it-works h2, .trades h2, .faq h2 { font-size: 26px; text-align: center; margin-bottom: 36px; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
.step-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--amber);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  margin-bottom: 14px;
}
.step-card h3 { font-size: 17px; }
.step-card p { margin: 0; font-size: 14.5px; }

/* Trades */
.trade-pills { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.trade-pills span {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--navy-2);
}

/* CTA band */
.cta-band { background: var(--navy); padding: 48px 0; }
.cta-band-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.cta-band h2 { color: #fff; margin-bottom: 6px; font-size: 24px; }
.cta-band p { color: #c7cede; margin: 0; }

/* FAQ */
.faq-item { max-width: 720px; margin: 0 auto 22px; }
.faq-item h3 { font-size: 16px; }
.faq-item p { margin: 0; font-size: 14.5px; }

/* Footer */
.site-footer { padding: 26px 0 40px; }
.site-footer p { font-size: 12.5px; text-align: center; margin: 0; }

/* Floating chat launcher */
.chat-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 18px 13px 15px;
  border: none;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(18, 33, 58, 0.28);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.chat-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(18, 33, 58, 0.34); }
.chat-fab-icon { font-size: 17px; line-height: 1; }

@media (max-width: 860px) {
  .chat-fab-label { display: none; }
  .chat-fab { padding: 13px; }
}

/* Chat overlay */
.chat-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 33, 58, 0.35);
  display: flex;
  justify-content: flex-end;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.chat-overlay.open { opacity: 1; pointer-events: auto; }

.chat-panel {
  width: 420px;
  max-width: 100vw;
  height: 100%;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  box-shadow: -12px 0 40px rgba(0,0,0,0.15);
}
.chat-overlay.open .chat-panel { transform: translateX(0); }

.chat-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: var(--navy);
  color: #fff;
}
.chat-panel-title { display: flex; align-items: center; gap: 10px; }
.chat-panel-title div { display: flex; flex-direction: column; line-height: 1.3; }
.chat-status { font-size: 11.5px; color: #9fd6a8; }
.chat-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
}

.chat-demo-banner {
  background: #fff4e0;
  color: #8a5a12;
  font-size: 12.5px;
  padding: 8px 16px;
  border-bottom: 1px solid #f2dfb3;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msg { max-width: 86%; padding: 11px 14px; border-radius: 14px; font-size: 14.5px; }
.msg p { margin: 0 0 8px; color: inherit; }
.msg p:last-child { margin-bottom: 0; }
.msg ol, .msg ul { margin: 6px 0; padding-left: 20px; }
.msg li { margin-bottom: 6px; }
.msg strong { font-weight: 700; }

.msg.assistant {
  background: var(--card);
  border: 1px solid var(--border);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  color: var(--text);
}
.msg.user {
  background: var(--navy);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.msg.error {
  background: #fdeaea;
  border: 1px solid #f3c6c6;
  color: #8a1f1f;
  align-self: flex-start;
}

.typing-indicator {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
}
.typing-indicator span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-muted);
  animation: blink 1.2s infinite ease-in-out;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

.chat-input-row {
  display: flex;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--border);
  background: var(--card);
}
.chat-input-row input {
  flex: 1;
  padding: 11px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 14.5px;
  outline: none;
}
.chat-input-row input:focus { border-color: var(--amber); }

/* Estimate page */
.back-link {
  font-size: 13.5px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}
.back-link:hover { color: var(--amber-dark); }

.estimate-hero { padding: 52px 0 8px; text-align: center; }
.estimate-hero h1 { font-size: clamp(24px, 6vw, 34px); letter-spacing: -0.4px; }
.estimate-hero p { max-width: 480px; margin: 0 auto; font-size: clamp(14px, 3.4vw, 16px); }

.estimate-wrap { padding: 28px 0 72px; }

.estimate-card-outer {
  max-width: 620px;
  margin: 0 auto;
  background: var(--card);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 36px;
}

.form-field { margin-bottom: 22px; }
.form-field label {
  display: block;
  font-weight: 600;
  font-size: 14.5px;
  margin-bottom: 8px;
  color: var(--navy);
}
.form-field .field-hint {
  display: block;
  font-weight: 400;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 4px;
}
.form-field textarea,
.form-field input[type="text"] {
  width: 100%;
  padding: 13px 15px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  font-size: 16px;
  font-family: inherit;
  outline: none;
  resize: vertical;
  transition: border-color 0.12s ease;
}
.form-field textarea:focus,
.form-field input[type="text"]:focus { border-color: var(--amber); }
.form-field textarea { min-height: 96px; }

.urgency-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.urgency-pill { position: relative; }
.urgency-pill input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.urgency-pill span {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy-2);
  transition: all 0.12s ease;
}
.urgency-pill input:checked + span {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.urgency-pill input:focus-visible + span { outline: 2px solid var(--amber); outline-offset: 2px; }

.estimate-submit { width: 100%; padding: 16px; font-size: 16px; }
.estimate-reassurance {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 14px 0 0;
}

.form-error {
  background: #fdeaea;
  border: 1px solid #f3c6c6;
  color: #8a1f1f;
  padding: 12px 15px;
  border-radius: 10px;
  font-size: 13.5px;
  margin-bottom: 18px;
}

.loading-state {
  text-align: center;
  padding: 40px 0;
}
.loading-spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--amber);
  margin: 0 auto 16px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-state p { margin: 0; font-size: 14.5px; }

/* Results */
.safety-banner {
  background: #fdeaea;
  border: 1.5px solid #f0b3b3;
  color: #7a1414;
  padding: 16px 18px;
  border-radius: 14px;
  font-size: 14.5px;
  font-weight: 600;
  margin-bottom: 20px;
}

.demo-data-banner {
  background: #fff4e0;
  color: #8a5a12;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 10px;
  margin-bottom: 20px;
}

.results-header { text-align: center; margin-bottom: 26px; }
.results-header .trade-badge {
  display: inline-block;
  background: #eef1f7;
  color: var(--navy-2);
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 5px 13px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.results-header h2 { font-size: 24px; margin-bottom: 6px; }

.cost-estimate-card {
  background: var(--navy);
  color: #fff;
  border-radius: 18px;
  padding: 28px;
  text-align: center;
  margin-bottom: 30px;
}
.cost-estimate-card .cost-label {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #9fb0d4;
  margin-bottom: 8px;
  display: block;
}
.cost-estimate-card .cost-range { font-size: clamp(26px, 7vw, 36px); font-weight: 800; margin-bottom: 10px; }
.cost-estimate-card .cost-note { color: #c7cede; font-size: 13.5px; max-width: 460px; margin: 0 auto; }

.matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.match-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.match-card .match-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--amber);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}
.match-card h3 { font-size: 16.5px; margin-bottom: 6px; }
.match-card .match-rating {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy-2);
  margin-bottom: 8px;
}
.match-card .match-rating .stars { color: #e0a82c; }
.match-card .match-meta {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.match-card .match-specialty {
  font-size: 12.5px;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 14px;
}
.match-card .match-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.match-card .match-actions a {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  border: 1.5px solid var(--border);
  color: var(--navy);
}
.match-card .match-actions a.primary { background: var(--amber); border-color: var(--amber); color: #fff; }

.no-matches {
  text-align: center;
  padding: 30px 0;
  color: var(--text-muted);
}

.results-footer {
  text-align: center;
  margin-top: 34px;
  font-size: 13.5px;
  color: var(--text-muted);
}
.results-footer a { color: var(--amber-dark); font-weight: 600; text-decoration: none; }

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .mock-chat-card { margin: 0 auto; }
  .steps-grid { grid-template-columns: 1fr; }
  .header-nav { display: none; }
  .estimate-card-outer { padding: 24px; }
}

/* Small phones — tighter spacing, stacked/full-width CTAs, easier tap targets */
@media (max-width: 480px) {
  .container { padding: 0 16px; }

  .header-inner { padding-top: 12px; padding-bottom: 12px; }
  .logo-text { font-size: 15px; }
  .header-inner .btn-small { padding: 9px 14px; font-size: 13px; }

  .hero { padding: 40px 0 28px; }
  .hero-actions { flex-direction: column; align-items: stretch; gap: 10px; margin: 18px 0 26px; }
  .hero-actions .btn-large { width: 100%; }
  .hero-microcopy { text-align: center; }
  .trust-row { justify-content: space-between; gap: 14px; }
  .trust-item strong { font-size: 16px; }
  .trust-item span { font-size: 11.5px; }

  .mock-chat-card { max-width: 100%; padding: 16px; }

  .how-it-works, .trades, .faq { padding: 40px 0; }
  .how-it-works h2, .trades h2, .faq h2 { font-size: 22px; margin-bottom: 26px; }
  .step-card { padding: 20px; }

  .cta-band { padding: 34px 0; }
  .cta-band-inner { flex-direction: column; align-items: stretch; text-align: center; }
  .cta-band-inner .btn-large { width: 100%; }

  .estimate-hero { padding: 36px 0 6px; }
  .estimate-card-outer { padding: 18px; border-radius: 16px; }
  .urgency-pills { gap: 8px; }
  .urgency-pill span { padding: 9px 13px; font-size: 13px; }

  .cost-estimate-card { padding: 22px 18px; }
  .match-card { padding: 16px; }
  .match-card .match-actions a { flex: 1; text-align: center; }

  .chat-panel-header { padding: 14px; }
  .chat-input-row { padding: 10px; }
}
