/* Page components for /como-funciona/ — loaded after site.css.
   Only what the shared design system does not already provide:
   the numbered step timeline and the product mock cards inside it. */

/* ---------- timeline shell ---------- */
.timeline {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 32px 40px;
}

.timeline-step {
  display: grid;
  grid-template-columns: 56px 1fr 1fr;
  align-items: start;
  gap: 32px;
  padding-bottom: 64px;
}

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

.timeline-rail {
  display: flex;
  height: 100%;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.timeline-num {
  display: flex;
  width: 44px;
  height: 44px;
  flex: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--dot);
  color: #fff;
  font-family: Sora, sans-serif;
  font-size: 16px;
  font-weight: 800;
}

.timeline-line {
  width: 2px;
  flex: 1;
  background: var(--tl-line, var(--rail));
}

/* The rail line fades downward; the tone-* classes only carry a flat rail. */
.timeline-step.tone-violet {
  --tl-line: linear-gradient(180deg, #c9aef4, #e4d6fa);
}

.timeline-step.tone-purple {
  --tl-line: linear-gradient(180deg, #e4b5f5, #f3d9fa);
}

.timeline-step.tone-pink {
  --tl-line: linear-gradient(180deg, #f5c1e8, #fbe2f4);
}

.timeline-step.tone-blue {
  --tl-line: linear-gradient(180deg, #a9d4f9, #d8ecfc);
}

.timeline-copy {
  padding-top: 4px;
}

.timeline-title {
  margin: 0;
  font-family: Sora, sans-serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
}

.timeline-copy p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.7;
}

.role-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.role-pill {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--pill-bg, var(--purple-soft));
  color: var(--pill-ink, var(--purple));
  font-size: 12.5px;
  font-weight: 600;
}

/* ---------- product mock card ---------- */
.step-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 36px -22px rgb(14 14 26 / 16%);
}

.step-card.is-tight {
  padding: 18px;
}

.status.is-small {
  padding: 4px 10px;
  font-size: 10.5px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
}

/* ---------- step 1: client record ---------- */
.record-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.record-avatar {
  display: flex;
  width: 38px;
  height: 38px;
  flex: none;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--pill-bg, var(--purple-soft));
  color: var(--pill-ink, var(--purple));
  font-family: Sora, sans-serif;
  font-size: 15px;
  font-weight: 700;
}

.record-name {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
}

.record-sub {
  margin: 0;
  color: var(--quiet);
  font-size: 12px;
}

.record-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid #f1f1f6;
  font-size: 12.5px;
}

.record-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.record-row dt {
  color: var(--quiet);
}

.record-row dd {
  margin: 0;
  color: var(--text);
  text-align: right;
}

.record-row dd.is-accent {
  color: var(--purple);
  font-weight: 600;
}

/* ---------- steps 2 and 4: money lines ---------- */
.line-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid #f1f1f6;
  color: var(--text);
  font-size: 12.5px;
}

.line-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.line-row dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

.line-row.is-total {
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid #f1f1f6;
}

.line-row.is-total dt {
  font-weight: 700;
}

.line-amount {
  font-family: Sora, sans-serif;
  font-weight: 700;
  color: var(--purple);
}

.line-amount.tone-green {
  color: var(--pill-ink);
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.mock-btn {
  flex: 1;
  padding: 9px 0;
  border: 1px solid #e4e4ee;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
}

.mock-btn.is-solid {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

/* ---------- step 3: project board ---------- */
.project-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.project-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--pill-ink);
}

.project-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 8px 0 0;
  color: var(--quiet);
  font-size: 10.5px;
}

.project-meta strong {
  color: var(--text);
}

.board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.board-col {
  padding: 10px;
  border: 1px solid #ececf3;
  border-radius: 12px;
}

.board-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
}

.board-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--pill-ink);
}

.board-card {
  margin-top: 8px;
  padding: 8px;
  border: 1px solid #f1f1f6;
  border-radius: 9px;
}

.board-ref {
  margin: 0;
  color: var(--quiet);
  font-family: ui-monospace, monospace;
  font-size: 9px;
}

.board-task {
  margin: 2px 0 0;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.4;
}

.board-task.is-done {
  color: var(--quiet);
  text-decoration: line-through;
}

.board-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 0;
  color: var(--quiet);
  font-size: 10.5px;
}

/* ---------- step 4: invoicing sparkbars ---------- */
.mini-bars {
  display: flex;
  height: 52px;
  align-items: flex-end;
  gap: 6px;
  margin-top: 14px;
}

.mini-bars i {
  flex: 1;
  border-radius: 4px;
  background: #d8ecfc;
}

.mini-bars i:nth-child(1) {
  height: 40%;
}

.mini-bars i:nth-child(2) {
  height: 55%;
  background: #a9d4f9;
}

.mini-bars i:nth-child(3) {
  height: 48%;
}

.mini-bars i:nth-child(4) {
  height: 70%;
  background: #7fbdf6;
}

.mini-bars i:nth-child(5) {
  height: 62%;
  background: #a9d4f9;
}

.mini-bars i:nth-child(6) {
  height: 85%;
  background: linear-gradient(180deg, #2380f2, #29b6f6);
}

.mini-caption {
  margin: 8px 0 0;
  color: var(--quiet);
  font-size: 11px;
  text-align: center;
}

/* ---------- step 5: next actions ---------- */
.next-head {
  margin: 0;
  color: var(--quiet);
  font-size: 12px;
  font-weight: 600;
}

.next-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.next-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid #f1f1f6;
  border-radius: 9px;
  font-size: 12.5px;
  line-height: 1.45;
}

.next-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--chip);
}

/* ---------- product screenshot band ---------- */
.shot-section {
  max-width: 1220px;
  margin: 48px auto 0;
  padding: 0 32px;
}

.shot-head {
  max-width: 680px;
  margin-bottom: 32px;
}

.section-title.is-compact {
  font-size: clamp(26px, 3vw, 32px);
  line-height: 1.2;
}

.section-lede.is-compact {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.65;
}

.shot-browser {
  max-width: 1060px;
  margin: 0 auto;
}

/* ---------- result band ---------- */
.result-band {
  margin-top: 72px;
}

.result-card {
  padding: 28px;
  border: 1px solid #ececf3;
  border-radius: 16px;
  text-align: center;
}

.result-num {
  margin: 0;
  background: linear-gradient(100deg, #8b5cf6, var(--pink));
  background-clip: text;
  color: transparent;
  font-family: Sora, sans-serif;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.2;
}

.result-label {
  margin: 8px 0 0;
  font-family: "Instrument Sans", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
}

.result-copy {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

@media (max-width: 980px) {
  .timeline {
    padding: 8px 32px 24px;
  }

  .timeline-step {
    grid-template-columns: 44px 1fr;
    gap: 20px;
    padding-bottom: 48px;
  }

  .timeline-rail {
    grid-row: span 2;
  }

  .timeline-step > .step-card {
    grid-column: 2;
    margin-top: 20px;
  }

  .timeline-title {
    font-size: 21px;
  }

  .result-band {
    margin-top: 56px;
  }
}

@media (max-width: 640px) {
  .timeline {
    padding: 8px 18px 16px;
  }

  .timeline-step {
    gap: 16px;
    padding-bottom: 40px;
  }

  .shot-section {
    padding-inline: 18px;
  }

  .board {
    grid-template-columns: 1fr;
  }
}
