/* Typeform-style intake engine — shared styles for seller + buyer intake flows.
 * Does NOT own question content; only layout, animations, and progress UI. */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600&display=swap');

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

:root {
  --tf-white: #ffffff;
  --tf-bg: #f8fafc;
  --tf-teal: #14b8a6;
  --tf-teal-dim: rgba(20,184,166,0.08);
  --tf-teal-dark: #0d9488;
  --tf-teal-glow: rgba(20,184,166,0.25);
  --tf-purple: #7c3aed;
  --tf-purple-dim: rgba(124,58,237,0.08);
  --tf-text: #0f172a;
  --tf-text-muted: #64748b;
  --tf-text-light: #94a3b8;
  --tf-border: rgba(20,184,166,0.12);
  --tf-border-strong: rgba(20,184,166,0.25);
  --tf-shadow: 0 8px 40px rgba(20,184,166,0.08);
  --tf-font-head: 'Space Grotesk', sans-serif;
  --tf-font-body: 'DM Sans', sans-serif;
  --tf-radius: 16px;
  --tf-radius-sm: 12px;
  --tf-accent: var(--tf-teal);
  --tf-accent-dim: var(--tf-teal-dim);
  --tf-accent-dark: var(--tf-teal-dark);
  --tf-accent-glow: var(--tf-teal-glow);
}

html, body {
  font-family: var(--tf-font-body);
  background: var(--tf-bg);
  color: var(--tf-text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ═══ Top bar ═══ */
.tf-topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--tf-border);
  height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem;
}
.tf-logo { font-family: var(--tf-font-head); font-size: 1.1rem; font-weight: 700; color: var(--tf-text); text-decoration: none; }
.tf-logo span { color: var(--tf-teal); }
.tf-topbar-right { display: flex; align-items: center; gap: 1rem; font-size: 0.82rem; color: var(--tf-text-muted); }
.tf-topbar-right a { color: var(--tf-text-muted); text-decoration: none; font-weight: 500; }
.tf-topbar-right a:hover { color: var(--tf-teal); }
.tf-counter { font-family: var(--tf-font-head); font-weight: 600; color: var(--tf-text); }

/* ═══ Progress bar ═══ */
.tf-progress {
  position: fixed; top: 56px; left: 0; right: 0; z-index: 99;
  height: 4px; background: rgba(20,184,166,0.1);
}
.tf-progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--tf-teal), var(--tf-purple));
  border-radius: 0 4px 4px 0;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
}

/* ═══ Section label ═══ */
.tf-section-label {
  position: fixed; top: 64px; left: 1.5rem; z-index: 98;
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--tf-text-light);
  padding: 6px 0;
  transition: opacity 0.3s;
}

/* ═══ Question viewport ═══ */
.tf-viewport {
  padding-top: 90px;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding-bottom: 100px;
}

/* ═══ Question slide ═══ */
.tf-slide {
  width: 100%; max-width: 580px;
  padding: 0 1.5rem;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  position: absolute;
  pointer-events: none;
}
.tf-slide.active {
  opacity: 1; transform: translateY(0);
  position: relative; pointer-events: auto;
}
.tf-slide.exit-up {
  opacity: 0; transform: translateY(-30px);
}
.tf-slide.exit-down {
  opacity: 0; transform: translateY(30px);
}

/* ═══ Question number ═══ */
.tf-qnum {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.72rem; font-weight: 700; color: var(--tf-accent);
  margin-bottom: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.tf-qnum .tf-arrow { font-size: 0.6rem; }

/* ═══ Question title ═══ */
.tf-title {
  font-family: var(--tf-font-head);
  font-size: 1.75rem; font-weight: 700;
  color: var(--tf-text);
  line-height: 1.25;
  margin-bottom: 0.5rem;
}
.tf-subtitle {
  font-size: 0.92rem; color: var(--tf-text-muted);
  line-height: 1.5; margin-bottom: 1.75rem;
}

/* ═══ Option cards (radio / single select) ═══ */
.tf-options { display: flex; flex-direction: column; gap: 0.6rem; }
.tf-option {
  position: relative;
  border: 1.5px solid var(--tf-border-strong);
  border-radius: var(--tf-radius-sm);
  padding: 0.85rem 1.1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex; align-items: center; gap: 0.75rem;
  font-size: 0.95rem; font-weight: 500; color: var(--tf-text);
  background: var(--tf-white);
  user-select: none;
}
.tf-option:hover {
  border-color: var(--tf-accent);
  background: var(--tf-accent-dim);
}
.tf-option.selected {
  border-color: var(--tf-accent);
  background: var(--tf-accent-dim);
  box-shadow: 0 0 0 3px var(--tf-accent-glow);
}
.tf-option.selected .tf-key {
  background: var(--tf-accent);
  color: white;
  border-color: var(--tf-accent);
}
.tf-option.selected {
  animation: tf-pulse 0.6s ease;
}
.tf-option input { position: absolute; opacity: 0; pointer-events: none; }
.tf-key {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; flex-shrink: 0;
  border: 1.5px solid var(--tf-border-strong);
  border-radius: 6px; font-size: 0.68rem; font-weight: 700;
  color: var(--tf-text-muted);
  transition: all 0.2s;
}
.tf-option-text { flex: 1; }
.tf-option-desc {
  display: block; font-size: 0.78rem; color: var(--tf-text-muted);
  font-weight: 400; margin-top: 2px;
}

/* ═══ Checkbox cards (multi select) ═══ */
.tf-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.tf-check {
  position: relative;
  border: 1.5px solid var(--tf-border-strong);
  border-radius: var(--tf-radius-sm);
  padding: 0.75rem 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.88rem; font-weight: 500; color: var(--tf-text);
  background: var(--tf-white);
  user-select: none; text-align: center;
}
.tf-check:hover { border-color: var(--tf-accent); background: var(--tf-accent-dim); }
.tf-check.selected {
  border-color: var(--tf-accent); background: var(--tf-accent-dim);
  box-shadow: 0 0 0 2px var(--tf-accent-glow);
  font-weight: 600; color: var(--tf-accent-dark);
}
.tf-check input { position: absolute; opacity: 0; pointer-events: none; }

/* ═══ Text input ═══ */
.tf-input-wrap { margin-bottom: 1rem; }
.tf-input-wrap label {
  display: block; font-size: 0.78rem; font-weight: 600;
  color: var(--tf-text); margin-bottom: 0.4rem;
}
.tf-input {
  width: 100%; padding: 0.85rem 1rem;
  border: 1.5px solid var(--tf-border-strong);
  border-radius: var(--tf-radius-sm);
  font-family: var(--tf-font-body); font-size: 1rem;
  color: var(--tf-text); background: var(--tf-white);
  outline: none; transition: border-color 0.2s;
}
.tf-input:focus { border-color: var(--tf-accent); }
.tf-input::placeholder { color: var(--tf-text-light); }
textarea.tf-input { resize: vertical; min-height: 100px; }
select.tf-input { cursor: pointer; }
.tf-input-hint {
  font-size: 0.75rem; color: var(--tf-text-muted);
  margin-top: 0.3rem;
}
.tf-dollar-wrap { position: relative; }
.tf-dollar-wrap .tf-input { padding-left: 1.5rem; }
.tf-dollar-wrap::before {
  content: '$'; position: absolute; left: 0.85rem; top: 50%;
  transform: translateY(-50%); color: var(--tf-text-muted);
  font-size: 1rem; pointer-events: none;
}

/* ═══ Button row ═══ */
.tf-actions {
  display: flex; align-items: center; gap: 0.75rem;
  margin-top: 1.75rem;
}
.tf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.85rem 2rem;
  border-radius: var(--tf-radius-sm);
  font-family: var(--tf-font-head); font-size: 0.95rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
  border: none;
}
.tf-btn-primary {
  background: var(--tf-accent); color: white;
}
.tf-btn-primary:hover { background: var(--tf-accent-dark); transform: translateY(-1px); }
.tf-btn-primary:active { transform: translateY(0); }
.tf-btn-secondary {
  background: transparent; color: var(--tf-text-muted);
  border: 1.5px solid var(--tf-border-strong);
}
.tf-btn-secondary:hover { border-color: var(--tf-accent); color: var(--tf-accent); }
.tf-enter-hint {
  font-size: 0.72rem; color: var(--tf-text-light);
  margin-left: 0.5rem;
}

/* ═══ Section milestone ═══ */
.tf-milestone {
  text-align: center; padding: 2.5rem 0;
}
.tf-milestone-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--tf-teal), var(--tf-teal-dark));
  color: white; font-size: 1.5rem; font-weight: 700;
  margin-bottom: 1rem;
  animation: tf-bounce 0.6s ease;
  box-shadow: 0 4px 20px var(--tf-accent-glow);
}
.tf-milestone-title {
  font-family: var(--tf-font-head);
  font-size: 1.3rem; font-weight: 700;
  color: var(--tf-accent-dark); margin-bottom: 0.3rem;
}
.tf-milestone-sub {
  font-size: 0.88rem; color: var(--tf-text-muted);
}

/* ═══ Score reveal ═══ */
.tf-score-reveal { text-align: center; padding: 1rem 0; }
.tf-score-big {
  font-family: var(--tf-font-head);
  font-size: 4rem; font-weight: 700;
  background: linear-gradient(135deg, var(--tf-teal), var(--tf-purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; line-height: 1;
  opacity: 0; transform: scale(0.5);
  animation: tf-score-pop 0.8s 0.3s ease forwards;
}
.tf-score-label {
  font-size: 0.8rem; color: var(--tf-text-muted);
  margin-top: 0.3rem; margin-bottom: 1.5rem;
}
.tf-dim-row {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.tf-dim-label {
  width: 130px; text-align: right;
  font-size: 0.78rem; font-weight: 500; color: var(--tf-text-muted);
  flex-shrink: 0;
}
.tf-dim-bar-track {
  flex: 1; height: 8px; background: rgba(20,184,166,0.1);
  border-radius: 99px; overflow: hidden;
}
.tf-dim-bar-fill {
  height: 100%; border-radius: 99px;
  width: 0%; transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.tf-dim-val {
  width: 40px; font-family: var(--tf-font-head);
  font-size: 0.82rem; font-weight: 700; color: var(--tf-text);
}

/* ═══ Completion ═══ */
.tf-complete { text-align: center; padding: 1.5rem 0; }
.tf-complete-icon { font-size: 3rem; margin-bottom: 0.75rem; }
.tf-complete-title {
  font-family: var(--tf-font-head);
  font-size: 1.6rem; font-weight: 700; color: var(--tf-text);
  margin-bottom: 0.4rem;
}
.tf-complete-sub {
  font-size: 0.92rem; color: var(--tf-text-muted);
  line-height: 1.5; margin-bottom: 1.5rem;
}
.tf-cta-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.9rem 2.5rem; background: var(--tf-accent); color: white;
  border-radius: var(--tf-radius-sm); text-decoration: none;
  font-family: var(--tf-font-head); font-size: 1rem; font-weight: 600;
  transition: all 0.2s;
}
.tf-cta-link:hover { background: var(--tf-accent-dark); transform: translateY(-1px); }

/* ═══ Legal / Info boxes ═══ */
.tf-info-box {
  background: var(--tf-accent-dim);
  border: 1px solid var(--tf-border-strong);
  border-radius: var(--tf-radius-sm);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}
.tf-info-box p { font-size: 0.85rem; color: var(--tf-text-muted); line-height: 1.5; }
.tf-warn-box {
  background: #fffbeb; border: 1px solid rgba(245,158,11,0.3);
  border-radius: var(--tf-radius-sm);
  padding: 1rem 1.25rem; margin-bottom: 1rem;
}
.tf-warn-box p { font-size: 0.85rem; color: #92400e; line-height: 1.5; }
.tf-success-box {
  background: #f0fdf4; border: 1px solid rgba(20,184,166,0.3);
  border-radius: var(--tf-radius-sm);
  padding: 0.75rem 1rem; margin-bottom: 1rem;
  font-size: 0.85rem; color: var(--tf-teal-dark);
}

/* ═══ Keyframes ═══ */
@keyframes tf-bounce {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes tf-score-pop {
  0% { opacity: 0; transform: scale(0.5); }
  60% { opacity: 1; transform: scale(1.1); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes tf-pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--tf-accent-glow); }
  50% { box-shadow: 0 0 0 8px transparent; }
}

/* ═══ Mobile ═══ */
@media (max-width: 600px) {
  .tf-title { font-size: 1.35rem; }
  .tf-checks { grid-template-columns: 1fr; }
  .tf-dim-label { width: 90px; font-size: 0.72rem; }
  .tf-section-label { display: none; }
  .tf-topbar { padding: 0 1rem; }
  .tf-slide { padding: 0 1rem; }
  .tf-btn { padding: 0.85rem 1.5rem; }
  .tf-enter-hint { display: none; }
}
