/* ============================================
   NeverMiss — Mobile-first, contractor-friendly
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #1B365D;
  --navy-light: #2A4A7F;
  --orange: #FF6B35;
  --orange-hover: #E85A25;
  --green: #22C55E;
  --green-light: #DCFCE7;
  --red: #EF4444;
  --red-light: #FEE2E2;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  --white: #FFFFFF;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 1120px;
  --transition: 0.2s ease;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--navy); text-decoration: none; }
ul, ol { list-style: none; }

/* --- Layout --- */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section--alt { background: var(--gray-50); }
.section--navy { background: var(--navy); color: var(--white); }
.text-center { text-align: center; }

/* --- Typography --- */
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; color: var(--gray-900); }
h1 { font-size: 2rem; }
h2 { font-size: 1.65rem; margin-bottom: 16px; }
h3 { font-size: 1.25rem; margin-bottom: 8px; }
p { margin-bottom: 12px; }
.subtitle { font-size: 1.125rem; color: var(--gray-600); line-height: 1.5; }
.section--navy h2, .section--navy h3, .section--navy .subtitle { color: var(--white); }

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 14px 28px;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-align: center;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  line-height: 1.3;
}
.btn:active { transform: scale(0.98); }

.btn--primary {
  background: var(--orange);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}
.btn--primary:hover { background: var(--orange-hover); box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4); }

.btn--secondary {
  background: var(--white);
  color: var(--navy);
  border: 2px solid var(--navy);
}
.btn--secondary:hover { background: var(--gray-50); }

.btn--navy {
  background: var(--navy);
  color: var(--white);
}
.btn--navy:hover { background: var(--navy-light); }

.btn--lg { padding: 16px 36px; font-size: 1.15rem; }
.btn--full { width: 100%; }
.btn--disabled { opacity: 0.5; pointer-events: none; }

.btn-group { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-group--center { justify-content: center; }

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 12px 0;
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
}
.nav__logo span { color: var(--orange); }
.nav__links { display: flex; gap: 8px; align-items: center; }
.nav__links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-600);
  padding: 8px 12px;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
}
.nav__links a:hover { color: var(--navy); background: var(--gray-50); }
.nav__links .btn { padding: 8px 18px; font-size: 0.9rem; }

/* --- Hero --- */
.hero {
  padding: 56px 0 48px;
  text-align: center;
}
.hero h1 {
  font-size: 2.25rem;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.hero .subtitle {
  max-width: 560px;
  margin: 0 auto 28px;
}
.hero .btn-group { justify-content: center; margin-bottom: 24px; }
.hero__proof {
  font-size: 0.875rem;
  color: var(--gray-400);
}

/* --- Steps --- */
.steps { display: grid; gap: 24px; }
.step {
  text-align: center;
  padding: 24px 16px;
}
.step__number {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}
.step__title { font-size: 1.1rem; margin-bottom: 6px; }
.step__desc { font-size: 0.95rem; color: var(--gray-600); }

/* --- Cards --- */
.card-grid { display: grid; gap: 20px; }
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.card__icon {
  font-size: 2rem;
  margin-bottom: 12px;
}
.card h3 { color: var(--gray-900); }
.card p { color: var(--gray-600); font-size: 0.95rem; margin-bottom: 0; }

/* --- ROI Banner --- */
.roi-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  color: var(--white);
  text-align: center;
}
.roi-banner h2 { color: var(--white); margin-bottom: 8px; }
.roi-banner p { color: rgba(255,255,255,0.85); }
.roi-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 24px 0;
}
.roi-stat__number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--orange);
}
.roi-stat__label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
  margin-top: 2px;
}

/* --- FAQ --- */
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--gray-200);
  padding: 20px 0;
}
.faq-item:last-child { border-bottom: none; }
.faq-q {
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--gray-900);
}
.faq-q::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--gray-400);
  flex-shrink: 0;
  transition: transform var(--transition);
}
.faq-item.open .faq-q::after { content: '−'; }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: var(--gray-600);
  font-size: 0.95rem;
  line-height: 1.6;
}
.faq-item.open .faq-a {
  max-height: 300px;
  padding-top: 12px;
}

/* --- CTA Block --- */
.cta-block {
  text-align: center;
  padding: 48px 24px;
  background: var(--gray-50);
  border-radius: var(--radius-lg);
}
.cta-block h2 { margin-bottom: 8px; }
.cta-block .subtitle { margin-bottom: 24px; }

/* --- Demo Chat --- */
.demo-setup {
  max-width: 500px;
  margin: 0 auto 24px;
}
.demo-setup label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--gray-700);
}
.demo-setup select,
.demo-setup input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 1rem;
  margin-bottom: 16px;
  background: var(--white);
  color: var(--gray-800);
  transition: border-color var(--transition);
}
.demo-setup select:focus,
.demo-setup input[type="text"]:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(27,54,93,0.1);
}

.chat-window {
  max-width: 500px;
  margin: 0 auto;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 420px;
}
.chat-header {
  background: var(--navy);
  color: var(--white);
  padding: 14px 16px;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.chat-header__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-msg {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.95rem;
  line-height: 1.4;
  word-break: break-word;
}
.chat-msg--user {
  align-self: flex-end;
  background: var(--navy);
  color: var(--white);
  border-bottom-right-radius: 4px;
}
.chat-msg--ai {
  align-self: flex-start;
  background: var(--white);
  color: var(--gray-800);
  border: 1px solid var(--gray-200);
  border-bottom-left-radius: 4px;
}
.chat-msg--system {
  align-self: center;
  background: var(--gray-100);
  color: var(--gray-500);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 12px;
}
.chat-input-area {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--gray-200);
  background: var(--white);
}
.chat-input-area input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--gray-300);
  border-radius: 20px;
  font-size: 0.95rem;
  outline: none;
}
.chat-input-area input:focus {
  border-color: var(--navy);
}
.chat-input-area button {
  padding: 10px 18px;
  border: none;
  border-radius: 20px;
  background: var(--orange);
  color: var(--white);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background var(--transition);
  white-space: nowrap;
}
.chat-input-area button:hover { background: var(--orange-hover); }
.chat-input-area button:disabled { opacity: 0.5; cursor: not-allowed; }

.chat-typing {
  align-self: flex-start;
  padding: 10px 14px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  font-size: 0.85rem;
  color: var(--gray-400);
}
.chat-typing span {
  animation: blink 1.4s infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%,60%,100%{opacity:0.2} 30%{opacity:1} }

/* --- Revenue Moment --- */
.revenue-moment {
  align-self: center;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #059669, #10b981);
  color: var(--white);
  padding: 14px 22px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(5,150,105,0.35);
  animation: revenuePop 0.4s ease-out;
}
.revenue-moment__check {
  font-size: 1.5rem;
  line-height: 1;
}
.revenue-moment__details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.revenue-moment__label {
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.revenue-moment__dollars {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}
.revenue-moment__text {
  font-weight: 600;
  font-size: 0.85rem;
  opacity: 0.92;
}
@keyframes revenuePop {
  0% { transform: scale(0.8); opacity: 0; }
  60% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

/* --- Suggestion Chips --- */
.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0;
  align-self: flex-end;
}
.chat-suggestion {
  background: var(--white);
  border: 1px solid var(--navy);
  color: var(--navy);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}
.chat-suggestion:hover {
  background: var(--navy);
  color: var(--white);
}

/* --- Qualification Progress --- */
.qual-progress {
  max-width: 500px;
  margin: 20px auto 0;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 16px;
}
.qual-progress h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
  margin-bottom: 12px;
}
.qual-items { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.qual-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--gray-400);
}
.qual-item--done { color: var(--green); font-weight: 500; }
.qual-check {
  width: 18px; height: 18px;
  border: 2px solid var(--gray-300);
  border-radius: 50%;
  flex-shrink: 0;
}
.qual-item--done .qual-check {
  background: var(--green);
  border-color: var(--green);
  position: relative;
}
.qual-item--done .qual-check::after {
  content: '✓';
  color: var(--white);
  font-size: 11px;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

/* --- Forms --- */
.form-card {
  max-width: 520px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow: var(--shadow-md);
}
.form-steps {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
}
.form-step-dot {
  width: 36px; height: 4px;
  border-radius: 2px;
  background: var(--gray-200);
  transition: background var(--transition);
}
.form-step-dot--active { background: var(--navy); }
.form-step-dot--done { background: var(--green); }

.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 1rem;
  background: var(--white);
  color: var(--gray-800);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(27,54,93,0.1);
}
.form-group input.error {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}
.form-error {
  font-size: 0.8rem;
  color: var(--red);
  margin-top: 4px;
  display: none;
}
.form-group input.error + .form-error { display: block; }
.form-hint {
  font-size: 0.8rem;
  color: var(--gray-400);
  margin-top: 4px;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}
.form-actions .btn { flex: 1; }

/* --- Alerts --- */
.alert {
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  margin-bottom: 16px;
}
.alert--error {
  background: var(--red-light);
  color: #B91C1C;
  border: 1px solid #FECACA;
}
.alert--success {
  background: var(--green-light);
  color: #166534;
  border: 1px solid #BBF7D0;
}
.alert--hidden { display: none; }

/* --- Success Page --- */
.success-card {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: 40px 24px;
}
.success-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 2rem;
}
.success-card h1 { font-size: 1.75rem; margin-bottom: 12px; }
.success-info {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px;
  margin: 24px 0;
  text-align: left;
}
.success-info dt {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
  margin-top: 12px;
}
.success-info dt:first-child { margin-top: 0; }
.success-info dd {
  font-weight: 600;
  color: var(--gray-900);
  font-size: 1.05rem;
}
.next-steps {
  text-align: left;
  margin: 24px 0;
}
.next-steps h3 { margin-bottom: 12px; }
.next-steps li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.95rem;
  color: var(--gray-700);
}
.next-steps li:last-child { border-bottom: none; }
.step-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--gray-200);
  padding: 32px 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--gray-400);
}
.footer a { color: var(--gray-500); }
.footer a:hover { color: var(--navy); }

/* --- Spinner --- */
.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Responsive: Tablet+ --- */
@media (min-width: 640px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  .hero h1 { font-size: 2.85rem; }
  .section { padding: 80px 0; }
  .hero { padding: 72px 0 60px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .container { padding: 0 32px; }
  .form-card { padding: 40px 32px; }
}

/* --- Responsive: Desktop --- */
@media (min-width: 960px) {
  .hero h1 { font-size: 3.25rem; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .card-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .roi-stats { grid-template-columns: repeat(4, 1fr); }
}

/* --- Utility --- */
.hidden { display: none !important; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
