/* ════════════════════════════════════════════════════════════════════
   style.css — ResponsePro Onboarding Form
   Matches responsepro.app visual language exactly:
     Primary blue:  #0066cc
     Dark blue:     #004c99
     Page bg:       #f8f9fa
     Dark text:     #222
     Muted text:    #555
     Border:        #e0e0e0
     Card bg:       #fff
   ════════════════════════════════════════════════════════════════════ */

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  background-color: #f8f9fa;
  color: #222;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

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

a { color: #0066cc; text-decoration: none; transition: color 0.2s ease; }
a:hover { color: #004c99; text-decoration: underline; }

/* ── Header ───────────────────────────────────────────────────────── */
.site-header {
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  gap: 1rem;
}

.nav-brand {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #0066cc;
}

.nav-brand-tag {
  font-size: 0.75rem;
  font-weight: 500;
  color: #888;
  background: #f0f0f0;
  padding: 2px 8px;
  border-radius: 12px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.nav-right { display: flex; align-items: center; gap: 0.875rem; }

.status-badge {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #555;
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  padding: 0.25rem 0.625rem;
  border-radius: 20px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2e7d32; /* green — form is secure/ready */
}

/* ── Hero strip ───────────────────────────────────────────────────── */
.hero-strip {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 2rem 0;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.hero-inner h1 {
  font-size: 1.625rem;
  font-weight: 700;
  color: #222;
  margin-bottom: 0.5rem;
}

.hero-inner p {
  font-size: 0.9375rem;
  color: #555;
  max-width: 520px;
}

.hero-steps {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-shrink: 0;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #0066cc;
  color: #fff;
  font-weight: 700;
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step span {
  font-size: 0.75rem;
  font-weight: 500;
  color: #555;
  white-space: nowrap;
}

.step-arrow {
  color: #bbb;
  font-size: 1.125rem;
  margin-bottom: 1.25rem;
}

/* ── Layout ───────────────────────────────────────────────────────── */
.form-section { padding: 2rem 0 3rem; }

.form-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1.5rem;
  align-items: start;
}

/* ── Form cards ───────────────────────────────────────────────────── */
.form-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.form-card-header {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1.125rem 1.25rem;
  border-bottom: 1px solid #e0e0e0;
  background: #fafafa;
}

.section-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.form-card-header h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #222;
  margin-bottom: 0.125rem;
}

.form-card-header p {
  font-size: 0.8125rem;
  color: #777;
}

.form-card-body { padding: 1.25rem; }

/* ── Fields ───────────────────────────────────────────────────────── */
.field-row {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

.field-row.two-col { grid-template-columns: 1fr 1fr; }

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.field-group label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #333;
}

.required { color: #c62828; }

.field-group input,
.field-group select,
.field-group textarea {
  font-family: inherit;
  font-size: 0.9375rem;
  color: #222;
  background: #fff;
  border: 2px solid #ddd;
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  transition: border-color 0.2s ease;
}

.field-group input { height: 2.5rem; }

.field-group select {
  height: 2.5rem;
  cursor: pointer;
  appearance: auto;
}

.field-group textarea {
  resize: vertical;
  min-height: 80px;
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  outline: none;
  border-color: #0066cc;
}

.field-group input.invalid,
.field-group select.invalid,
.field-group textarea.invalid {
  border-color: #c62828;
}

.field-hint {
  font-size: 0.75rem;
  color: #888;
  margin-top: 2px;
}

.field-error {
  font-size: 0.75rem;
  color: #c62828;
  font-weight: 500;
  min-height: 1rem;
  display: block;
}

/* ── Tier cards ───────────────────────────────────────────────────── */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.875rem;
  margin-top: 0.5rem;
}

.tier-card {
  position: relative;
  cursor: pointer;
}

.tier-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tier-card-inner {
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: #fff;
  position: relative;
}

.tier-card input:checked + .tier-card-inner {
  border-color: #0066cc;
  box-shadow: 0 0 0 3px rgba(0,102,204,0.12);
}

.tier-card:hover .tier-card-inner {
  border-color: #0066cc;
}

.tier-badge {
  position: absolute;
  top: -1px;
  right: 10px;
  background: #0066cc;
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 0 0 6px 6px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tier-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.375rem;
}

.tier-price {
  font-size: 1.625rem;
  font-weight: 700;
  color: #222;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.tier-price span {
  font-size: 0.875rem;
  font-weight: 400;
  color: #888;
}

.tier-features {
  list-style: none;
  padding: 0;
}

.tier-features li {
  font-size: 0.8125rem;
  color: #555;
  padding: 0.2rem 0;
  padding-left: 1.25rem;
  position: relative;
}

.tier-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #2e7d32;
  font-weight: 700;
}

/* ── Checkboxes ───────────────────────────────────────────────────── */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #333;
  cursor: pointer;
  padding: 0.25rem 0;
}

.checkbox-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: #0066cc;
}

.checkbox-agree {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  align-items: flex-start;
}

/* ── Agreement box ────────────────────────────────────────────────── */
.agreement-box {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: #555;
}

.agreement-box p { margin-bottom: 0.5rem; font-weight: 500; color: #333; }

.agreement-box ul {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* ── Character counter ────────────────────────────────────────────── */
.char-counter {
  font-size: 0.75rem;
  color: #888;
  text-align: right;
  margin-top: 0.25rem;
}

/* ── Honeypot ─────────────────────────────────────────────────────── */
.honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
  height: 0;
  overflow: hidden;
}

/* ── Submit row ───────────────────────────────────────────────────── */
.submit-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.625rem;
}

.btn-submit {
  height: 3rem;
  padding: 0 2rem;
  font-size: 1rem;
}

.submit-note {
  font-size: 0.8125rem;
  color: #777;
}

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  height: 2.5rem;
  padding: 0 1.25rem;
  background: #0066cc;
  color: #fff;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
}

.btn-primary:hover {
  background: #004c99;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,102,204,0.25);
  text-decoration: none;
  color: #fff;
}

.btn-primary:disabled {
  background: #94b8e0;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  height: 2.5rem;
  padding: 0 0.875rem;
  background: none;
  color: #555;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
  text-decoration: none;
}

.btn-ghost:hover {
  border-color: #0066cc;
  color: #0066cc;
  text-decoration: none;
}

/* ── Spinner ──────────────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  flex-shrink: 0;
}

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

/* ── Global error ─────────────────────────────────────────────────── */
.global-error {
  margin: 1rem 20px;
  padding: 0.875rem 1rem;
  background: #fff3f3;
  border: 1px solid #f5c6c6;
  border-radius: 6px;
  color: #c62828;
  font-size: 0.9375rem;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Sidebar ──────────────────────────────────────────────────────── */
.form-sidebar {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.125rem;
}

.sidebar-card h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #222;
  margin-bottom: 0.875rem;
}

/* Timeline */
.timeline {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline li {
  display: flex;
  gap: 0.75rem;
  padding-bottom: 1rem;
  position: relative;
}

.timeline li:last-child { padding-bottom: 0; }

.timeline li:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 18px;
  bottom: 0;
  width: 2px;
  background: #e0e0e0;
}

.timeline-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #0066cc;
  flex-shrink: 0;
  margin-top: 3px;
}

.timeline li strong {
  font-size: 0.875rem;
  font-weight: 600;
  color: #222;
  display: block;
  margin-bottom: 0.2rem;
}

.timeline li p {
  font-size: 0.8125rem;
  color: #666;
}

/* Security card */
.security-card {
  background: #f8f9fa;
  border-color: #e0e0e0;
}

.security-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.security-list li {
  font-size: 0.875rem;
  color: #555;
  padding-left: 1.25rem;
  position: relative;
}

.security-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #2e7d32;
  font-weight: 700;
}

/* ── Success state ────────────────────────────────────────────────── */
.success-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 3rem 2rem;
  text-align: center;
  max-width: 560px;
  margin: 3rem auto;
}

.success-icon { font-size: 3rem; margin-bottom: 1rem; }

.success-card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #222;
  margin-bottom: 0.75rem;
}

.success-card p { font-size: 0.9375rem; color: #444; }

/* ── Footer ───────────────────────────────────────────────────────── */
footer {
  background: #222;
  color: #fff;
  padding: 1.5rem 0;
  margin-top: auto;
}

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

footer p { margin: 0; font-size: 0.9rem; }

.footer-nav { display: flex; gap: 1.5rem; }

.footer-nav a {
  color: #ccc;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-nav a:hover { color: #0066cc; text-decoration: none; }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .form-layout { grid-template-columns: 1fr; }
  .form-sidebar { position: static; }
  .hero-steps { display: none; }
}

@media (max-width: 640px) {
  .field-row.two-col { grid-template-columns: 1fr; }
  .tier-grid { grid-template-columns: 1fr; }
  .checkbox-grid { grid-template-columns: 1fr; }
  .hero-inner h1 { font-size: 1.375rem; }
}

@media (max-width: 480px) {
  html { font-size: 14px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-nav { flex-wrap: wrap; justify-content: center; }
}
