/* ============================================================
   Wurk — Conversational contact flow (Typeform-style)
   ============================================================ */

.tf {
  position: relative;
  min-height: calc(100vh - 76px);
  min-height: calc(100dvh - 76px);
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(28,106,94,.10), transparent 60%),
    radial-gradient(700px 500px at -5% 110%, rgba(194,120,58,.10), transparent 60%),
    var(--paper);
  overflow: hidden;
}

/* Progress bar */
.tf-progress { position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--line); z-index: 5; }
.tf-bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--primary), var(--emerald)); transition: width .55s var(--ease); }

/* Viewport holds one step at a time */
.tf-viewport { flex: 1; display: grid; place-items: center; padding: 56px 28px; position: relative; }
.tf-step { width: 100%; max-width: 700px; display: none; }
.tf-step.is-active { display: block; animation: tfIn .55s var(--ease) both; }
.tf-step.is-leaving { animation: tfOut .3s var(--ease) both; }
@keyframes tfIn  { from { opacity: 0; transform: translateY(34px); } to { opacity: 1; transform: none; } }
@keyframes tfOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-26px); } }

/* Question anatomy */
.tf-num { font-family: var(--font-mono); font-size: .82rem; letter-spacing: .12em; color: var(--accent); display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.tf-num svg { width: 14px; height: 14px; }
.tf-q { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.7rem, 4.2vw, 2.9rem); line-height: 1.12; letter-spacing: -0.02em; color: var(--ink); }
.tf-q .req { color: var(--accent); font-size: .6em; vertical-align: super; }
.tf-help { color: var(--muted); font-size: 1rem; margin-top: 12px; }

/* Big borderless inputs */
.tf-input, .tf-textarea {
  width: 100%; border: 0; border-bottom: 2px solid var(--line-strong);
  background: transparent; color: var(--ink);
  font-family: var(--font-display); font-size: clamp(1.3rem, 3vw, 2rem); font-weight: 400;
  padding: 14px 2px; margin-top: 26px; transition: border-color .25s var(--ease);
}
.tf-input::placeholder, .tf-textarea::placeholder { color: var(--line-strong); }
.tf-input:focus, .tf-textarea:focus { outline: none; border-bottom-color: var(--primary); }
.tf-textarea { font-family: var(--font-sans); font-size: clamp(1.1rem, 2vw, 1.4rem); resize: none; min-height: 92px; line-height: 1.5; }

/* Choice cards */
.tf-choices { display: grid; gap: 12px; margin-top: 30px; }
.tf-choice {
  display: flex; align-items: center; gap: 16px;
  padding: 17px 20px; border: 1.5px solid var(--line-strong); border-radius: 13px;
  background: var(--surface); cursor: pointer; text-align: left; width: 100%;
  font-size: 1.06rem; color: var(--ink); font-weight: 500;
  transition: transform .2s var(--ease), border-color .2s, background .2s, box-shadow .2s;
}
.tf-choice:hover { border-color: var(--primary); transform: translateX(5px); box-shadow: var(--shadow-sm); }
.tf-choice.selected { border-color: var(--primary); background: var(--accent-soft); }
.tf-choice .key {
  width: 32px; height: 32px; flex: none; border: 1.5px solid var(--line-strong); border-radius: 8px;
  display: grid; place-items: center; font-family: var(--font-mono); font-size: .85rem; color: var(--ink-soft);
  transition: all .2s var(--ease);
}
.tf-choice:hover .key, .tf-choice.selected .key { background: var(--primary); border-color: var(--primary); color: #fff; }
.tf-choice .ck { margin-left: auto; opacity: 0; transition: opacity .2s; color: var(--primary); }
.tf-choice.selected .ck { opacity: 1; }

/* Actions */
.tf-actions { display: flex; align-items: center; gap: 16px; margin-top: 34px; flex-wrap: wrap; }
.kbd-hint { font-family: var(--font-mono); font-size: .78rem; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.kbd-hint kbd { font-family: var(--font-mono); background: var(--paper-2); border: 1px solid var(--line); border-radius: 5px; padding: 2px 7px; font-size: .72rem; }
.tf-err { color: #B4452E; font-size: .92rem; margin-top: 14px; display: none; align-items: center; gap: 7px; }
.tf-err.show { display: flex; }

/* Intro + done */
.tf-intro .eyebrow, .tf-done .eyebrow { margin-bottom: 18px; }
.tf-intro h1 { font-size: clamp(2.2rem, 6vw, 4rem); margin-bottom: 20px; }
.tf-intro .lead { max-width: 540px; margin-bottom: 34px; }
.tf-meta { display: inline-flex; align-items: center; gap: 8px; margin-left: 4px; font-family: var(--font-mono); font-size: .78rem; color: var(--muted); }

.tf-done { text-align: center; }
.tf-done .chk { width: 74px; height: 74px; border-radius: 50%; background: var(--accent-soft); color: var(--emerald); display: grid; place-items: center; margin: 0 auto 26px; animation: pop .5s var(--ease) both; }
.tf-done .chk svg { width: 38px; height: 38px; }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }
.tf-done h2 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 14px; }
.tf-done p { color: var(--ink-soft); max-width: 480px; margin: 0 auto 28px; }

/* Review */
.tf-review-list { margin: 28px 0 6px; border-top: 1px solid var(--line); }
.tf-review-list .row { display: grid; grid-template-columns: 180px 1fr; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.tf-review-list .row .k { font-family: var(--font-mono); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tf-review-list .row .v { font-size: 1.05rem; color: var(--ink); }
.tf-review-list .row .v:empty::after { content: "—"; color: var(--line-strong); }

/* Footer controls */
.tf-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px; border-top: 1px solid var(--line); background: rgba(250,248,244,.7); backdrop-filter: blur(8px);
  position: sticky; bottom: 0;
}
.tf-count { font-family: var(--font-mono); font-size: .8rem; color: var(--muted); }
.tf-count b { color: var(--primary); }
.tf-nav { display: flex; gap: 8px; }
.tf-nav button {
  width: 42px; height: 38px; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--surface);
  display: grid; place-items: center; color: var(--ink-soft); transition: all .2s var(--ease);
}
.tf-nav button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.tf-nav button:disabled { opacity: .35; cursor: not-allowed; }
.tf-nav svg { width: 18px; height: 18px; }

@media (max-width: 560px) {
  .tf-viewport { padding: 36px 22px; }
  .tf-review-list .row { grid-template-columns: 1fr; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .tf-step.is-active, .tf-step.is-leaving, .tf-done .chk { animation: none; }
  .tf-bar { transition: none; }
}
